Incremental Snapshot Based Technique on Paged Translation Systems

ABSTRACT

A system comprising a processor and a memory storing instructions that, when executed, cause the system to identify a plurality of dump units associated with a translation table in a storage device, determine a plurality of snapshot markers associated with the plurality of dump units, calculate a first value of a first snapshot marker from the plurality of snapshot markers in the storage device, identify a second snapshot marker from an additional source, the second snapshot marker having a second value satisfying the first value, retrieve a dump unit associated with the second snapshot marker from the additional source, and reconstruct the translation table using the dump unit.

BACKGROUND

The present disclosure relates to reconstructing the translation tablestate on boot up after planned and unplanned shutdown. In particular,the present disclosure describes a mechanism to recreate the translationtable on start-up under constrained memory conditions. Still moreparticularly, the present disclosure relates to incrementally persistingthe translation table with minimal input/output to protect against dataloss after an unplanned shutdown.

Many storage device and systems use a dynamic translation table thatkeeps track of latest mapping of a logical block to physical media. Asand when logical blocks are overwritten, the translation table isupdated to point to the new physical media location and the old physicalmedia location is reclaimed by the garbage collection process. Examplesof such devices and systems include flash based SSDs, SMR drives,key-value and object stores, etc.

As device capacities increase with active data reduction (e.g.compression and deduplication) techniques, the number of logical blocks(user data) that can be stored on the storage device increases, henceincreasing the memory consumption of translation structures. In suchsystems, a paged translation system is implemented to constrain thememory consumption. A paged translation system stores a subset oftranslation table entries on the storage device with dynamic ‘page-in’and ‘page-out’ of translation table entries depending on data accesspattern. These systems pose unique challenges with respect toreconstructing the translation table state on boot up after planned andunplanned shutdown.

SUMMARY

The present disclosure relates to systems and methods for reconstructingthe translation table state on boot up after planned and unplannedshutdown. According to one innovative aspect of the subject matter inthis disclosure, a system has one or more processors and a memorystoring instructions that, when executed, cause the system to: identifya plurality of dump units associated with a translation table in astorage device; determine a plurality of snapshot markers associatedwith the plurality of dump units; calculate a first value of a firstsnapshot marker from the plurality of snapshot markers in the storagedevice; identify a second snapshot marker from an additional source, thesecond snapshot marker having a second value after the first value;retrieve a dump unit associated with the second snapshot marker from theadditional source; and reconstruct the translation table using the dumpunit.

In general, another innovative aspect of the subject matter described inthis disclosure may be implemented in methods that include: identifyinga plurality of dump units associated with a translation table in astorage device; determining a plurality of snapshot markers associatedwith the plurality of dump units; calculating a first value of a firstsnapshot marker from the plurality of snapshot markers in the storagedevice; identifying a second snapshot marker from an additional source,the second snapshot marker having a second value after the first value;retrieving a dump unit associated with the second snapshot marker fromthe additional source; and reconstructing the translation table usingthe dump unit.

In general, another innovative aspect of the subject matter described inthis disclosure may be implemented in methods that include: receiving arequest to reconstruct the translation table statistics; identifying athird snapshot marker from the additional source, the third snapshotmarker being associated with a subset of dump groups and the thirdsnapshot marker having a third value after the first value; reading thesubset of dump groups associated with the translation table from theadditional source; and reconstructing the translation table statisticsusing the subset of dump groups associated with the translation table.

In general, another innovative aspect of the subject matter described inthis disclosure may be implemented in methods that include: receiving arequest to create a translation table entry; logging the translationtable entry in a meta-log; incrementing a first snapshot markerassociated with the meta-log; updating a reverse translation table withthe translation table entry; determining whether the updated reversetranslation table is persisted in a storage device; and in response todetermining that the updated reverse translation table is persisted inthe storage device, incrementing a second snapshot marker associatedwith the reverse translation table.

Other implementations of one or more of these aspects includecorresponding systems and apparatus, configured to perform the actionsof the methods, encoded on computer storage devices.

These and other implementations may each optionally include one or moreof the following features.

For instance, the operations further include: storing the first snapshotmarker and the second snapshot marker in memory.

For instance, the features may include that the first snapshot markerincludes a free running counter denoting a timestamp of sufficientgranularity; that the first snapshot marker includes a counterassociated with an update of a translation table, the counter beingincremented each time the translation table is persisted; that theadditional source is a meta-log and the first snapshot marker includes acounter associated with a meta-log entry, the counter being incrementedeach time a new meta-log entry is created; that the additional sourceincludes a reverse translation table and a meta-log; and that thereconstruction of the translation table using the dump unit, furthercomprises adding the dump unit to the translation table in the memory.

These implementations are particularly advantageous in a number ofrespects. For instance, the technology describes herein can be used forreconstructing the translation table state on boot up after planned andunplanned shutdown.

It should be understood that language used in the present disclosure hasbeen principally selected for readability and instructional purposes,and not to limit the scope of the subject matter disclosed herein.

BRIEF DESCRIPTION OF THE DRAWINGS

The present disclosure is illustrated by way of example, and not by wayof limitation in the figures of the accompanying drawings in which likereference numerals are used to refer to similar elements.

FIG. 1 is a high-level block diagram illustrating an example system forimplementing a general unified paging method for translation tablesaccording to the techniques described herein.

FIG. 2 is a block diagram illustrating an example of storage logicaccording to the techniques described herein.

FIG. 3 is a block diagram illustrating an example of memory according tothe techniques described herein.

FIG. 4 is a block diagram illustrating an example unified paging moduleaccording to the techniques described herein.

FIG. 5 is a block diagram illustrating an example snapshot marker basedreconstruction module according to the techniques described herein.

FIG. 6 is a block diagram illustrating an example checkpoint basedreconstruction module according to the techniques described herein.

FIG. 7 is a block diagram illustrating an example garbage collectionmodule according to the techniques described herein.

FIG. 8 is a block diagram illustrating an example translation tablemanagement module according to the techniques described herein.

FIG. 9 is an example graphical representation illustrating oneembodiment of a unified paging structure for translation tables,according to the techniques described herein.

FIG. 10A is a flow chart of an example method for implementation of ageneral unified paging of translation tables, according to thetechniques described herein.

FIG. 10B is a flow chart of an example method for implementing a writerequest on a unified paged structure of translation tables, according tothe techniques described herein.

FIGS. 10C and 10D are flow charts of an example method for implementinga read request from a unified paged structure of translation tables,according to the techniques described herein.

FIG. 11A is a flow chart of an example method for maintaining snapshotmarkers, according to the techniques described herein.

FIG. 11B is a flow chart of an example method for reconstructing atranslation table using snapshot markers under constrained memory,according to the techniques described herein.

FIGS. 12A and 12B are flow charts of an example method for starting upunder constrained memory conditions using two dump groups, according tothe techniques described herein.

FIG. 13A is a flow chart of an example method for maintainingtranslation table checkpoints, according to the techniques describedherein.

FIG. 13B is a flow chart of an example method for reconstructing atranslation table using translation table checkpoints, according to thetechniques described herein.

FIG. 14A is a flow chart of an example method for maintaining a bitmap,according to the techniques described herein.

FIG. 14B is a flow chart of an example method for garbage collectionoptimization, according to the techniques described herein.

FIGS. 15A and 15B are example graphical representations to showing pagedtranslation maps are preserved in the memory to increase their usage,according to the techniques described herein.

FIG. 16 is a flow chart of an example method for tracking translationtable entries in memory, according to the techniques described herein.

FIGS. 17A and 17B are flow charts of an example method for maintaining amulti-level linked list for translation table entries, according to thetechniques described herein.

DETAILED DESCRIPTION

Systems and methods for implementing a general unified paging method fortranslation tables are described below. In particular, in the presentdisclosure, systems and methods for addressing various issues related tothe unified paging method and specifically in flash-storage devices aredescribed below. While the systems, methods of the present disclosureare described in the context of particular system architecture that usesflash-storage, it should be understood that the systems and methods canbe applied to other architectures and organizations of hardware.

Overview

The present disclosure relates to a general unified paging method fortranslation tables. In particular, the present disclosure describessystems and methods for storing the bulk of translation structures in astorage system, while keeping a small subset in the memory. Still moreparticularly, the present disclosure describes systems and methods thatsolve issues arising out of implementing a large translation structurein limited flash memory.

The present disclosure aims at solving the issues of speed, reliability,durability and sparsity of translation tables. File systems relysignificantly on the locality of reference for their performance and theworst-case behavior can require multiple dependent media accesses. Thepresent disclosure treats the translation table entries similar to userdata. Consequently, the start-up process resolves circular dependencieswhen populating reading translation table entries from persistent media(which in-turn requires various translation entries to be presentbeforehand). The start-up process recreates the translation datastructures such that the translation subsystem operates strictly withina restricted DRAM limit (the limit is the same as the limit that existedbefore shutdown).

Translation structure sizing depends on the unit of allocation (the“block size”). In most modern SSDs, block size of 4 KB is commonly seen.The following factors contribute to the size of the translationstructure—the capacity of the storage device or system. A larger devicecan store more data, and would correspondingly have a larger number oftranslation entries. For example, a 4 TB device with a 4 KB block sizewill have 4 TB/4 KB=2³⁰ entries at most. If data reduction techniquessuch as compression are deployed, the same device can store more data.For example, for an average compression ratio of 2:1, the number ofentries in the above example would double to 2³¹. The choice of the datastructure to implement the translation tables may be a linearly indexedarray (Table[L]=P).

The size of the translation tables is typically expressed as a fractionof the device size. Linearly indexed arrays are typically in the rangeof 0.1%, while hashed sparse structures can be implemented with sizes inthe range 0.2%-0.5% without data reduction, with a correspondingamplification for data reduction. A translation table implemented forflash based system would need to handle the media property of not beingable to do in-place update and hence treating translation table entriesas special entities involves additional implementation overhead withrespect to various media specifics like garbage collection,wear-levelling, read-disturb, retention etc.

Furthermore, when a particular translation table entry is not present inmemory, the entry has to be looked up in storage media for which thereneeds to be a way to find the location on storage media to search themapping for. For dense translation tables, a simple mapping can becreated that maps a given logical block number to fixed location onstorage media. As an example, the logical address space would beidentical to physical address space, for dense translation tables. For asparse translation table, an 80 bit logical block number address spacewith each translation entry consuming 16 bytes, would require 2̂80*16=2̂84bytes of logical address space reserved for storing translation tableentries, with fixed mapping.

Storage (flash storage) systems are expected to exhibit low latenciesfor latency sensitive applications that use these storage systems. Theread latency is mostly media characteristic dominated. With use of powersafe/capacitor backed SRAM as cache for recently written data, writelatency can be minimized independent of media characteristics. However,on a system that has a paged translation structure, it is possible thata write request is received on a logical block that does not have itstranslation entry in memory in which case an implementation wouldinvolve fetching the on-media translation entry and then modifying theentry corresponding to the new location where data is written. Thisimplementation incurs a read latency for a write operation that isundesired.

In some embodiments, since translation table maps are periodicallypersisted, there exists a window of vulnerability after the creation ofa map entry and before it has been persisted—during this window, anunplanned power outage can cause information (and data) to be lost. Insome embodiments, the persistence of maps is not synchronized—reversemap is persisted based on locality parameters, forward map issynchronized whenever there is memory pressure or enough map entrieshave been accumulated.

In virtual memory management systems, the translation table is alwaysmemory resident with the last level of translation pointing to a memoryaddress or a swap area address. In contrast, the translation tables arepartially resident on storage media. Typical file systems are built ontop of a media abstraction that allows in-place overwrite of any data.

In some embodiments, a typical implementation of garbage collectionsystem involves identifying a physical area on storage media to flash togarbage collect and then query for all the logical blocks that fall onthis physical area of flash. The query involves some implementation of areverse map structure(that maps physical location to logical blocknumbers) and then a validation step with forward map structure. Thereverse map structures are typically not strictly up-to-date and hencethe information from reverse map structure is validated with the forwardmap structure to decide on the physical locations that are still validand need the data to be moved. The garbage collection needs to preserveattributes associated with the logical block for which the typicalimplementation is to query the forward map.

Whenever translation table crosses the threshold memory consumptionlimit, translation table entries need to be purged from memory. Onlypersisted translation table entries can be purged from memory. Thismeans the entries to be purged must be first written to storage mediabefore purging from memory. The selection of entries to be written tostorage media determines the input/output efficiency of writing tostorage media. This aspect is relevant since tracking of translationtable entries is in form of chunks (in our implementation dump unit is achunk) and hence every chunk in the system at any point of time may havea mix of non-persisted and persisted entries and hence it is importantto select chunks that has a good fraction of non-persisted entries. Theselection of entries to purge must consider spatial and temporallocality exhibited by typical workloads.

A. Unified Paging Scheme for Dense and Sparse Translation Tables onFlash Storage Systems

The translation table entries are treated similar to user data writtento a reserved logical space which is not available to user. The logicalspace reservation can be implemented through a dedicatedpartition/namespace. Treating translation table entries similar to userdata implies the location where translation table entries are dumped canbe reached only through the translation table. To avoid circulardependencies here, the translation map entries for logical blocklocations corresponding to translation table dump are pinned in memoryso that they are always resident in memory.

In one embodiment, the system has a dynamically updated look upstructure referred to as a map dump table. The map dump table consistsof the following:

-   -   a. Dump unit—This is smallest unit at which the map dump table        maintains mapping from logical block to storage media location        where translation entries are dumped. A logical block is mapped        to a particular dump unit using a hash function.    -   b. Dump group—In order to have efficient media lookup, the dump        unit must be as small as possible so that minimal input/output        would need to be done to fetch translation entry for a given        logical block. A dump group is a collection of fixed number of        dump units that when dumped are dumped together for write        input/output efficiency.    -   c. Dump group logical space reservation—The logical space        reserved for translation table dumps are divided into fixed size        regions with each region assigned to a dump group. This division        provides ease of management.    -   d. Reverse linked list of dump units—A given dump unit may be        dumped multiple times based on usage pattern with each dump unit        having a disjoint set of entries. To keep track of all active        locations where a dump unit is dumped, a reverse linked list        starting from map dump table is maintained.        An example of the map dump unit is described in more detail        below with reference to FIG. 9.

B. Incremental Snapshot Based Technique on Paged Translation Systems

A snapshot marker can be implemented in different embodiments includingdifferent functions. Some embodiments may include: 1) A free runningcounter denoting time—A timestamp of sufficient granularity associatedwith a map entry can allow determining older vs. newer entries; 2) Acounter associated with reverse map updates—Each time a reverse map ispersisted, a counter is incremented; and 3) A counter associated withmeta-log entries—Each time a new map entry is created, the counter isincremented. In some embodiments, the meta-log entries are entries froma journal of recent logical map to physical map updates that have notyet been persisted in a reverse translation map.

A forward map dump unit is the smallest unit at which the forward mapdump table maintains mappings from logical block to storage medialocation where translation entries are dumped. At reconstruction time,the saved value of the forward map dump units is retrieved. In someembodiments, the map dump table compactly describes the saved value ofthe snapshot marker for each dump unit. Therefore the system looks formap entries that were created after the snapshot marker had that value.The other sources of map information are reverse-map chunks and meta-logentries. Based on the recorded snapshot marker values therein, it isefficient to determine whether a given reverse-map chunk or meta-logentry would contribute to the eventual forward map. This significantlyaccelerates map reconstruction—processing a large part of the reversemap (created before the snapshot marker had the said value) can beavoided.

C. Checkpoint Based Technique for Bootstrapping Forward Map underConstrained Memory for Flash Devices

On systems with a paged forward map, a subset of the forward map isresident in storage media while the other subset is resident in memorywith continuous flow of entries back and forth between storage media andmemory. A snapshot intends to capture the memory resident map entriesthat have not yet been persisted to storage media to be able to recreatethe memory resident state on boot-up after a planned or unplannedshutdown.

A snapshot of the translation table includes the map dump table and thenon-persisted maps (maps that are not backed up in storage media andneed to be persisted before they can be purged from memory). The systemperiodically takes a snapshot of the translation table and persists itin storage media. Between two consecutive snapshots, there is a timewindow where updates to the translation table may happen. These updates,after the last snapshot, need to be obtained from meta-log and/orreverse map. To remember the portion of reverse-map and meta-log, whichwas updated after the last snapshot is taken, the systems and methods ofthe present disclosure to add a checkpoint.

A checkpoint can be implemented in different embodiments includingdifferent functions. Some embodiments may include: 1) A free runningcounter denoting time—A timestamp of sufficient granularity associatedwith a map entry can allow determining older vs. newer entries; 2) Acounter associated with reverse map updates—Each time a reverse map ispersisted, a counter is incremented; and 3) A counter associated withmeta-log entries—Each time a new map entry is created, the counter isincremented.

D. Translation Lookup and Garbage Collection Optimizations on StorageSystem with Paged Translation Table

In some embodiments, implementing the present disclosure with garbagecollection can be performed as described below. A bitmap may bemaintained with a bit per physical block. In some embodiments, the sizeof the bitmap may be limited by the physical size of the storage deviceand is not dependent on the large logical space that a sparsetranslation structure supports.

Whenever a physical block is assigned to a logical block, thecorresponding bit is turned ON and whenever the logical block isoverwritten (hence invalidating the previously mapped physical block),the corresponding bit is turned OFF. Garbage collection selects thephysical chunk to relocate and using the bitmap and filters out onlythose physical blocks that have the bit turned ON. These are the onlyblocks that needed to be relocated, since all other blocks areimplicitly holding data that has been overwritten with newer data.

E. Efficient Management of Paged Translation Maps in Memory and Flash

When maps are purged from memory as part of memory-reclaim process, itis important to be able to figure out which maps to preserve in memory,and which maps to page out. This disclosure proposes an approach toefficiently track the maps in a dump-unit, and to separate thefrequently accessed maps from the rarely accessed ones. It also makesthe memory-reclaim process faster by grouping the rarely accessed mapstogether for faster removal. In some embodiments, the system maintainsstatistics on a per-dump-group basis, that counts how many maps arepresent in each dump group, how many of these maps are currentlynon-persisted in storage media and how many of these are not allowed tobe purged from memory. For each dump group, a linked-list pointer isalso stored that allows the dump group to be attached to a linked list.A multi-level linked-list data structure is used to categorize the dumpgroups. Each linked list holds the dump groups that satisfy a certainpre-defined criteria for that list. Then each of the dump groups isevaluated and added to one of the lists. In some embodiments, thecriteria for the linked lists is chosen to be the number ofnon-persisted maps present in the dump group and thenon-persisted-to-total maps ratio for the dump group. In someembodiments, the non-persisted maps are also alternatively referred toas dirty entries. As the number of non-persisted maps changes in a dumpgroup, the present disclosure re-evaluates if the dump group needs to bemigrated to some other list. This way, each of the dump groups is alwaysloosely sorted in its respective linked list.

System

FIG. 1 is a high-level block diagram illustrating an example system 100for managing translation tables according to the techniques describedherein. In the depicted embodiment, the system 100 may include storagelogic 104 and one or more storage devices 110 a, 110 b through 110 n. Inthe illustrated embodiment, the storage logic 104 and the one or morestorage devices 110 a, 110 b through 110 n are communicatively coupled.However, the present disclosure is not limited to this configuration anda variety of different system environments and configurations can beemployed and are within the scope of the present disclosure. Otherembodiments may include additional or fewer components. It should berecognized that FIG. 1 as well as the other figures used to illustratean embodiment, and an indication of a letter after a reference number ornumeral, for example, “110 a” is a specific reference to the element orcomponent that is designated by that particular reference numeral. Inthe event a reference numeral appears in the text without a letterfollowing it, for example, “110,” it should be recognized that such is ageneral reference to different embodiments of the element or componentbearing that general reference numeral.

In some embodiments, the storage logic 104 provides translation tablemanagement schemes. The storage logic 104 can provide computingfunctionalities, services, and/or resources to send, receive, read,write, and transform data from other entities of the system 100. In someembodiments, the storage logic 104 can be a computing device configuredto make a portion or all of the storage space available on storagedevices 110. In some embodiments, the storage logic 104 receives a datastream as input. In other embodiments, the storage logic 104 transmitsdata between the storage devices 110. It should be recognized thatmultiple storage logic units 104 can be utilized, either in adistributed architecture or otherwise. For the purpose of thisapplication, the system configuration and operations performed by thesystem are described in the context of a single storage logic 104.

The storage devices 110 a, 110 b through 110 n, may include anon-transitory computer-usable (e.g., readable, writeable, etc.) medium,which can be any non-transitory apparatus or device that can contain,store, communicate, propagate or transport instructions, data, computerprograms, software, code routines, etc., for processing by or inconnection with a processor. In some embodiments, the storage devices110 a, 110 b through 110 communicate and cooperate with the storagelogic 104 via signal lines 126 a, 126 b though 126 n. While the presentdisclosure reference to the storage devices 110 as flash memory, itshould be understood that in some embodiments, the storage devices 110may include a non-transitory memory such as a dynamic random accessmemory (DRAM) device, a static random access memory (SRAM) device, orsome other memory devices.

FIG. 2 is a block diagram illustrating an example of storage logic 104according to the techniques described herein. The storage logic 104 iscombinational logic, firmware, software, code, or routines or somecombination thereof for implementing cross device redundancy schemes. Asdepicted in FIG. 2, the storage logic 104 may include an input buffer220, a controller 201, a unified paging module 202, a snapshot markerbased reconstruction module 204, a checkpoint based reconstructionmodule 206, a garbage collection module 208, a translation tablemanagement module 210, an output buffer 230, and a memory 212 which maybe electronically communicatively coupled by a communication bus (notshown) for cooperation and communication with each other. Thesecomponents 220, 201, 202, 204, 206, 208, 210, 230 and 212 are alsocoupled for communication with the other entities (e.g., storage devices110) of the system 100.

In one embodiment, the input buffer 220, the controller 201, the unifiedpaging module 202, the snapshot marker based reconstruction module 204,the checkpoint based reconstruction module 206, the garbage collectionmodule 208, the translation table management module 210, the outputbuffer 230, and the memory 212 are hardware for performing theoperations described below. In some embodiment, the input buffer 220,the controller 201, the unified paging module 202, the snapshot markerbased reconstruction module 204, the checkpoint based reconstructionmodule 206, the garbage collection module 208, the translation tablemanagement module 210, the output buffer 230, and the memory 212 aresets of instructions executable by a processor or logic included in oneor more customized processors, to provide its respectivefunctionalities. In some embodiments, the input buffer 220, thecontroller 201, the unified paging module 202, the snapshot marker basedreconstruction module 204, the checkpoint based reconstruction module206, the garbage collection module 208, the translation table managementmodule 210, the output buffer 230, and the memory 212 are stored in amemory and are accessible and executable by a processor to provide itsrespective functionalities. In further embodiments, the input buffer220, the controller 201, the unified paging module 202, the snapshotmarker based reconstruction module 204, the checkpoint basedreconstruction module 206, the garbage collection module 208, thetranslation table management module 210, the output buffer 230, and thememory 212 are adapted for cooperation and communication with aprocessor and other components of the system 100. The particular namingand division of the units, modules, routines, features, attributes,methodologies and other aspects are not mandatory or significant, andthe mechanisms that implement the present invention or its features mayhave different names, divisions, and/or formats.

The input buffer 220 is a buffer and software, code, or routines forreceiving data and commands from one or more devices. In one embodiment,the input buffer 220 receives a data stream (data packets) from one ormore devices and prepares them for storage in a non-volatile storagedevice (e.g. storage media or storage devices 110). In some embodiments,the input buffer 220 receives incoming data packets and temporallystores the data packets into the memory 212. In further embodiments, theinput buffer 220 receives translation table entries and allocates themfor storage in one or more storage devices 110. In other embodiments,the input buffer 220 receives a data stream from one or more devices andtransmits the data stream to the unified paging module 202 and/or one ormore other components of the storage logic 104.

The controller 201 includes software and/or logic for handlingcommunications between the input buffer 220, the unified paging module202, the snapshot marker based reconstruction module 204, the checkpointbased reconstruction module 206, the garbage collection module 208, thetranslation table management module 210, the output buffer 230 and thememory 212. In one embodiment, the controller 201 can be a set ofinstructions to store data stream in the memory 212. In anotherembodiment, the controller 201 can be instructions stored in the memory212 of the storage logic 104 and can be accessible and executable byother components of the storage logic 104. The controller 201 inco-operation with the unified paging module 202, the snapshot markerbased reconstruction module 204, the checkpoint based reconstructionmodule 206, the garbage collection module 208, the translation tablemanagement module 210 implement the methods of 10A to 17B below.

The unified paging module 202 is logic, software, code, or routines forimplementing general unified paging method for translation tables. Theunified paging module 202 may include software and/or logic forgenerating a dynamic look up structure for translation table entries.The unified paging module 202 is described in more detail below withreference to FIGS. 4 and 10A-10D.

The snapshot marker based reconstruction module 204 is logic, software,code, or routines for reconstructing the translation table state on bootup after planned and unplanned shutdown using snapshot markers. Thesnapshot marker based reconstruction module 204 may include softwareand/or logic for persisting translation table entries in the storagedevice 110 and reconstructing the translation table on boot up. Thesnapshot marker based reconstruction module 204 is described in moredetail below with reference to FIGS. 5, 11A,11B, 12A, and 12B.

The checkpoint based reconstruction module 206 is logic, software, code,or routines for capturing a snapshot of a translation table to persistit efficiently. The checkpoint based reconstruction module 206 mayinclude software and/orlogic for persisting translation table snapshotsin the storage device 110 and reconstructing the translation table usingthe translation table snapshots on boot up. The checkpoint basedreconstruction module 206 is described in more detail below withreference to FIGS. 6 and 13A-13B.

The garbage collection module 208 is logic, software, code, or routinesfor efficient garbage collection. The garbage collection module 208 mayinclude softwareand/or logic for pinning looked up translation tableentries to avoid multiple lookup fault during efficient garbagecollection. The garbage collection module 208 is described in moredetail below with reference to FIGS. 7 and 14A-14B.

The translation table management module 210 is logic, software, code, orroutines for selecting which translation maps to page-out to flash forgood paging efficiency. The translation table management module 210 mayinclude software and/or logic for efficiently preserving the frequentlyused translation maps in memory to enable faster lookups and selectingwhich translation maps to page-out to flash for good paging efficiency.The translation table management module 210 is described in more detailbelow with reference to FIG. 8, 16, 17A, and 17B.

The output buffer 230 is software, code, logic, or routines for queuingdata for storage in the storage media or device 110. In one embodiment,the output buffer 230 receives data (e.g. translation table entries) andtemporarily stores the data into a memory buffer (not shown). Forinstance, the output buffer 230 can temporarily store a data stream in amemory buffer while, waiting for one or more components to completeprocessing of other tasks, before transmitting the data stream to theone or more components to perform its acts and/or functionalitiesthereon. In some embodiments, the output buffer 230 receives a datastream from the unified paging module 202 and transmits the data streamto the storage devices 110 for storage.

The memory 212 may store and provide access to data for the othercomponents of the storage logic 104. The memory 212 may be included in asingle computing device or distributed among a plurality of computingdevices. In some implementations, the memory 212 may store instructionsand/or data that may be executed by a processor. The instructions and/ordata may include code for performing the techniques described herein.For example, in one embodiment, the memory 212 may store the forwardtranslation map 302, the reverse translation map 304, the timestamp log306, the bitmap 308 and the metal-log journal 310, which are describedin more detail below with reference to FIG. 3. The memory 212 is alsocapable of storing other instructions and data, including, for example,an operating system, hardware drivers, other software applications,databases, etc. The memory 212 may be coupled to a bus for communicationwith a processor (not shown) and the other components of the storagelogic 104.

The memory 212 may include one or more non-transitory computer-usable(e.g., readable, writeable) devices, a dynamic random access memory(DRAM) device, a static random access memory (SRAM) device, mediums,which can be any tangible apparatus or device that can contain, store,communicate, or transport instructions, data, computer programs,software, code, routines, etc., for processing by or in connection witha processor. In some implementations, the memory 212 may include one ormore of volatile memory and non-volatile memory. It should be understoodthat the memory 212 may be a single device or may include multiple typesof devices and configurations. The memory 212 is described in moredetail with reference to FIG. 3.

FIG. 3 is a block diagram illustrating an example of memory 212. Asdepicted in FIG. 3, the example memory 212 may include the forwardtranslation map 302, the reverse translation map 304, the timestamp log306, the bitmap 308 and the metal-log journal 310.

The forward translation map 302 may be translation structure that maps alogical address associated with an entry to a physical addressassociated with the entry. In one embodiment, the forward translationtable may provide translation from logical to physical (i.e. L->P)location.

The reverse translation map 304 may be translation structure that maps aphysical address associated with an entry to a logical addressassociated with the entry. In one embodiment, the reverse translationtable may provide translation from physical to logical block (i.e.P->L). The translation from physical to logical block may exhibitspatial locality during updates due to log write nature of using flashmedia. In some embodiments, updates to the reverse translation map 304may be periodically persisted in the storage device 110.

The timestamp log 306 may include a snapshot marker and a checkpointassociated with a snapshot. The snapshot marker may be a free runningcounter denoting time. In some embodiments, the free running counter isincremented for each snapshot marker. The snapshot marker may be atimestamp of sufficient granularity associated with a map entry canallow determining older vs. newer entries. In some embodiments, thesnapshot marker may be a counter associated with reverse translationtable updates, wherein each time a reverse translation table ispersisted, the counter is incremented. In some embodiments, the snapshotmarker may be a counter associated with meta-log entries, wherein eachtime a new meta-log entry is created, the counter is incremented. Itshould be understood that the counter could be incrementing ordecrementing so long as the counter value can be used to determineearlier snapshot markers from later snapshot markers.

The checkpoint may be included in a translation table snapshot. Thecheckpoint may be a free running counter denoting time. The checkpointmay be a timestamp of sufficient granularity associated with a map entrycan allow determining older vs. newer entries. In some embodiments, thecheckpoint may be a counter associated with reverse translation tableupdates, wherein each time a reverse translation table is persisted, thecounter is incremented. In some embodiments, the checkpoint may be acounter associated with meta-log entries, wherein each time a newmeta-log entry is created, the counter is incremented.

The bitmap 308 is a structure with bit per physical block. The bitmap308 is maintained in the memory 212. Since, this is a bit per physicalblock, the size of this bitmap is dependent upon the physical size ofthe storage device 110 and is not dependent on the large logical spacethat a sparse translation structure supports.

The meta-log journal 310 includes a journal of recent logical map tophysical map updates that have not yet been persisted in a reversetranslation map. For example, the meta-log journal 310 may protectagainst any data loss scenarios because it persistently records mapinformation that may not have been persisted in the reverse translationmap. In one embodiment, each new translation table entry is logged inthe special structure called meta-log before a write operation isconsidered complete. In some embodiments, the meta-log journal 310 is alimited size structure. For example, the meta-log journal 310 may beable to record a limited portion of data before it needs to flush outprevious data entries into storage devices 110.

FIG. 4 is a block diagram illustrating an example unified paging moduleconfigured to implement the techniques described herein. As depicted inFIG. 4, the example unified paging module 202 may include the dump groupgenerating module 402 and the reverse linked list generating module 404.

In some embodiments, the components 402 and 404 are electronicallycommunicatively coupled for cooperation and communication with eachother, and are also coupled for communication with the other entities(e.g. storage device 110) of the system 100. In further embodiments, thedump group generating module 402 and the reverse linked list generatingmodule 404 are sets of instructions executable by the storage logic 104.In other embodiments, the dump group generating module 402 and thereverse linked list generating module 404 are stored in the storagelogic 104 and are accessible and executable by a processor (not shown)to provide their respective functionalities.

The dump group generating module 402 is logic or routines for generatingdump groups associated with translation table entries. In oneembodiment, the dump group generating module 402 is a set ofinstructions executable by a processor. In another embodiment, the dumpgroup generating module 402 is stored in the storage logic 104 and isaccessible and executable by the processor. In either embodiment, thedump group generating module 402 is adapted for cooperation andcommunication with the processor and other components of the system 100including other components of the unified paging module 202.

In some embodiments, the dump group generating module 402 may generatedump groups associated with a dense translation table. In someembodiments, the dump group generating module 402 may receive a requestto generate dump group from data received from the input buffer 220. Insome embodiments, the dump group generating module 402 may generate dumpgroups associated with a sparse translation table. In some embodiments,the dump group generating module 402 may determine that a particulartranslation table entry is not present in the memory 212. The dump groupgenerating module 402 may then look up the entry in the storage device110. In some embodiments, the dump group generating module 402 maycreate a mapping that maps a given logical block number to fixedphysical location on the storage device 110. For instance, in a densetranslation table, the dump group generating module 402 creates themapping between the logical block number and the fixed physical locationon the storage device 110.

A sparse translation table has logical block numbers for a very widerange of addresses. As an example, an 80 bit logical block numberaddress space may have each translation entry consuming 16 bytes. Withfixed mapping, this would require, 2̂80*16=2̂84 bytes of logical addressspace reserved for storing translation table entries. In someembodiments, the dump group generating module 402 may generate adynamically updated lookup structure (map dump table) that maps thelogical block number to a location on the storage device 110. Forinstance, in a sparse translation table, the dump group generatingmodule 402 generates a unified paging structure (also referred to hereinas a “map dump table”) that maps the logical block number to a locationon the storage device 110.

In some embodiments, the dump group generating module 402 identifies adump unit associated with a translation table entry. For instance, thedump unit may be associated with a translation table entry from theforward translation map 302. Throughout this description the term “dumpunit” is used interchangeably with the term “bucket”. In someembodiments, the dump unit may be a smallest unit at which the map dumptable maintains mapping from logical block to the storage device 110location where translation table entries are dumped. In someembodiments, the dump group generating module 402 may map a logicalblock to a particular dump unit using a hash function. The hash functionmay be selected to well distribute logical blocks to various dump unitsas well as assign a few successive logical blocks to same dump unit toget a locality benefit for typical workloads. An example hash functionmay be Dump_unit(L)=L mod 512. This function maps successive logicalblock numbers to the same or the next dump unit.

In some embodiments, the dump group generating module 402 identifies adump unit associated with the logical block and determines a dump groupassociated with the dump unit. In order to have efficient storage devicelookup, the dump unit should be as small as possible so that minimalinput/output is required to fetch a translation table entry for a givenlogical block. In some embodiments, the dump group generating module 402may have a write path optimized for larger logical block sizes. Forinstance, it is desirable for dump translation table entries to havelarger block sizes. In some embodiments, a dump group is a collection offixed number of dump units that are grouped together for input/outputefficiency during a write operation.

In some embodiments, the dump group generating module 402 may reserve alogical space on the storage device 110 for the dump group. In someembodiments, the logical space reserved for dumping translation tableentries are divided into fixed size regions with each region assigned toa dump group. This division advantageously provides ease of managementof translation table entries.

In some embodiments, the dump group generating module 402 generates apaged translation structure for translation table entries. In someembodiments, the dump group generating module 402 may receive a writerequest on a logical block that does not have its translation entry inthe memory 212. In that case, the dump group generating module 402 maycreate a new entry in the memory 212 in response to receiving a writerequest. In some embodiments, the dump group generating module 402 mayeliminate duplicate entries for a logical block to get a consolidatedrepresentation of translation table entries on the storage device 110.

The reverse linked list generating module 404 is logic or routines forgenerating a reverse linked list in the storage device 110. In oneembodiment, the reverse linked list generating module 404 is a set ofinstructions executable by a processor (not shown). In anotherembodiment, the reverse linked list generating module 404 is stored inthe storage logic 104 and is accessible and executable by the processor.In either embodiment, the reverse linked list generating module 404 isadapted for cooperation and communication with the processor and othercomponents of the system 100 including other components of the unifiedpaging module 202.

In some embodiments, reverse linked list generating module 404 mayidentify a most recent translation table entry associated with a dumpunit. For instance, the reverse linked list generating module 404 mayidentify the most recent translation table entry associated with thedump unit on the storage device 110. In some embodiments, the dump unitmay be dumped multiple times based on usage pattern. Each dump unit mayhave a disjoint set of translation table entries. The reverse linkedlist generating module 404 may generate a reverse linked list startingfrom the most recent translation table entry through the previoustranslation table entries associated with the dump unit. For instance,the reverse linked list generating module 404 may generate the reverselinked list to keep track of active locations on the storage device 110where the dump unit is dumped.

In some embodiments, the reverse linked list generating module 404 maymaintain a reverse chronological order of updates on a given logicalblock (with latest update being at the front of the linked list). Thisproperty is used to correctly satisfy a future lookup with the latestmapping for the requested logical block. For example, if a logical blockL is updated as L->P″, L->P′ and L->P. The reverse linked listgenerating module 404 may track chronological order of updates to L, andthe latest mapping for L can be unambiguously and quickly determined.

In some embodiments, the reverse linked list generating module 404 maytraverse the reverse linked list and populate an in-memory translationtable with the latest version of translation table entries from thestorage device 110. The reverse linked list generating module 404 maytrigger a dump of this group. In some embodiments, the reverse linkedlist generating module 404 eliminates duplicate entries for a givenlogical block. For example, a logical block L may have multiple mappingsstored in media (e.g. L->P″, L->P′, etc.). The reverse linked listgenerating module 404 may eliminate duplicate entries for a givenlogical block in a periodic manner.

FIG. 5 is a block diagram illustrating an example snapshot marker basedreconstruction module 204 configured to implement the techniquesdescribed herein. A snapshot marker may be a marker associated with adump unit on the storage device 110. The snapshot marker may be capturedbefore the dump unit is written and the snapshot marker may be updatedafter dump unit write is complete. As depicted in FIG. 5, the examplesnapshot marker based reconstruction module 204 may include the mapreconstruction module 502, the reconstruction under constrained memorymodule 504, and the statistics reconstruction module 506.

In some embodiments, the components 502, 504, and 506 are electronicallycommunicatively coupled for cooperation and communication with eachother, and are also coupled for communication with the other entities(e.g. storage device 110) of the system 100. The map reconstructionmodule 502 is logic or routines for reconstructing a translation tableusing a snapshot marker. The reconstruction under constrained memorymodule 504 is logic or routines for reconstruction of a translationtable under constrained memory. The statistics reconstruction module 506is logic or routines for reconstruction of statistics using translationtable snapshot. In further embodiments, the map reconstruction module502, the reconstruction under constrained memory module 504, and thestatistics reconstruction module 506 are sets of instructions executableby the storage logic 104. In other embodiments, the map reconstructionmodule 502, the reconstruction under constrained memory module 504, andthe statistics reconstruction module 506 are stored in the storage logic104 and are accessible and executable by a processor (not shown) toprovide their respective functionalities.

In some embodiments, the map reconstruction module 502 may implement asnapshot marker with the property that it is possible to examine thesystem and determine whether a translation table entry was createdbefore or after the marker. In some embodiments, the map reconstructionmodule 502 may implement the snapshot marker can be as a free runningcounter denoting time. For example, the snapshot marker can be atimestamp of sufficient granularity associated with a translation tableentry can allow determining older vs. newer entries.

In some embodiments, the map reconstruction module 502 may implement asnapshot marker as a counter associated with reverse translation tableupdates. For instance, each time a reverse translation table ispersisted in the storage device 110, the counter is incremented. Inother embodiments, the map reconstruction module 502 may implement asnapshot marker as a counter associated with meta-log entries. Forexample, each time a new translation table entry is created, and loggedin the meta-log journal 310, the counter is incremented. In someembodiments, the map reconstruction module 502 may store the snapshotmarker in the timestamp log 306 stored in the memory 212.

In some embodiments, the map reconstruction module 502 may annotate eachreverse translation table entry, meta-log entry, and dump-unit (forwardmap chunks) with the snapshot marker value at the time of creation ofthat piece of information. This helps in fast translation tablereconstruction after a planned/unplanned shutdown. In some embodiments,at reconstruction time, the map reconstruction module 502 may start withthe saved value of a plurality of dump units associated with the forwardtranslation map 302. In some embodiments, the timestamp log 306compactly describes the saved value of the snapshot marker for eachdump-unit. Therefore, in some embodiments, the map reconstruction module502 may only have to look for translation table entries that werecreated after the snapshot marker had that value. The additional sourcesof translation table information are chunks of the reverse translationtable and the meta-log entries. In some embodiments, the chunks ofreverse translation table may be stored in the reverse translation map304 and the meta-log entries may be stored in the meta-log journal 310.In some embodiments, the map reconstruction module 502 may retrievesnapshot marker value from the timestamp log 306. Based on the retrievedsnapshot marker values, in some embodiments, the map reconstructionmodule 502 may determine whether a given reverse translation table entryor a given meta-log entry would contribute to reconstructing a forwardmap. This significantly accelerates translation table reconstruction asprocessing a large part of the reverse translation table (portion of thereverse translation table created before the snapshot marker had theretrieved value) can be avoided.

In some embodiments, the map reconstruction module 502 may rely on themeta-log journal 310. For instance, the minimum value of a savedsnapshot marker across the dump units, as dump units are written oroverwritten, is a non-decreasing value. In some embodiments, themeta-log journal 310 may retain information at least as far back as theminimum saved snapshot marker. In some embodiments, the mapreconstruction module 502 may construct the entire forward translationtable using the dump units associated with the saved forward translationmap 302 and the meta-log journal 310.

The method for translation table reconstruction can be described usingthe following example. In the example, L1 is a first logical block andP1 is a physical location. A write happened on L1 that mapped tophysical location P1. A new forward translation table entry L1→P1 and areverse translation table entry P1→L1 was created. Reverse translationtable entry P1→L1 was persisted with snapshot marker value S1. L1→P1translation table entry persisted with snapshot marker value S1. A writehappened on L2 that mapped to physical location P2. In this example, theforward map entry L2→P2 is created and is still in memory (not persistedyet). Reverse map entry P2→L2 is persisted with sequence number S2>S1.An unplanned shutdown of the system is followed by a system restart.When the system is starting up, the translation table updates beforesnapshot marker S1 are available on the storage device 110 and onlytranslation table entries beyond snapshot marker S1 are retrieved fromthe reverse translation table (e.g. reverse translation map 304), i.e.,only L2→P2 needs to be retrieved from the reverse translation table.This significantly speeds up the translation table reconstructionbecause a large fraction of the reverse translation table (those createdbefore snapshot marker had the value S1) need not be read and processed.

In some embodiments, the reconstruction under constrained memory module504 may receive a request to reconstruct a translation table underconstrained memory. In some embodiments, the reconstruction underconstrained memory module 504 may read the map dump (translation tableentries) into the memory 212 from a well-known region. This provides thelast persisted contents of a map dump table. In some embodiments, thereconstruction under constrained memory module 504 may compute a minimumvalue of the snapshot markers across the dump groups. In someembodiments, the reconstruction under constrained memory module 504 mayretrieve the minimum value of the snapshot markers across the dumpgroups from the timestamp log 306. In some embodiments, thereconstruction under constrained memory module 504 may scan entriesbeyond the minimum snapshot marker from the reverse translation map 304and/or the meta-log journal 310. During reconstruction, in someembodiments, the reconstruction under constrained memory module 504 maythen selectively scan entries and add the entries to the translationtable. In one embodiment, the selection criterion may be that the entrybeing added has a value of a first snapshot marker associated with itbeyond a value of a second snapshot marker for the particular dumpgroup. This results in populating only those entries that were in memory212 at the time of unplanned shutdown, thus reducing memory consumption.

The method for starting up under constrained memory using two dumpgroups can be described using the following example. In the followingexample, two dump groups DG1 and DG2 are considered. The sequencedescribes only events relevant to translation table and it is implicitthat these translation table updates are occurring after the data writeson the corresponding logical blocks. The convention used below is torefer LiGn for logical block i belonging to dump group n. Translationtable entries L1G1→P1 and L1G2→P2 are added to the in-memory translationtable. In the next step, P1→L1G1 and P2→L1G2 are persisted in thereverse map with a sequence number S1. Next, the translation tableentries for DG1 are persisted with snapshot marker of S1 i.e. L1G1→P1 isnow persisted and the corresponding memory is reclaimed. Translationtable entries L2G1→P3 and L2G2→P4 are added to the in-memory translationtable. Next, P3→L2G1 and P4→L2G2 are persisted in the reverse map with asequence number S2. Translation table entries for DG2, i.e., L1G2→P2 andL2G2→P4 are now persisted and the corresponding memory is reclaimed. Inthe following step, an unplanned shutdown is followed by a systemrestart. The start-up flow first populates the dump group table thusrecording S1 as the snapshot marker for DG1 and recording S2>S1 as thesnapshot marker for DG2. The method for reconstruction identifies onlyL2G1 in DG1 with sequence number greater than Si and thus populates onlythis entry in memory. For DG2, there is no reverse translation tableentry with sequence greater than S2 and hence nothing extra is added toin-memory translation table. Thus, the only entry that was in memory 212at the time of unplanned shutdown comes back into memory 212 afterunplanned shutdown. The above steps result in populating only thoseentries that were in memory 212 at the time of unplanned shutdown, thusreducing memory consumption.

In one embodiment, the translation table may be a forward translationtable and may be stored in the forward translation map 302 in the memory212. In another embodiment, the translation table may be a reversetranslation table and may be stored in the reverse translation map 304in the memory 212. In some embodiments, the statistics reconstructionmodule 506 cannot bring the translation table into the memory 212 due toconstrained size of memory 212.

In some embodiments, the statistics reconstruction module 506 mayreceive a request to reconstruct translation table statistics after aplanned system shutdown. In response to receiving the request, thestatistics reconstruction module 506 may restore the statistics that arepersisted into a known region on the storage device 110. This providesquick start up ability for planned shutdowns.

At other times, the statistics reconstruction module 506 may receive arequest to reconstruct translation table statistics after an unplannedsystem shutdown. In response to receiving the request, in someembodiments, the statistics reconstruction module 506 may regenerate thetranslation table statistics using the methods described below.

In some embodiments, a translation table includes multiple dump groups,of which only a subset can fit into the constrained memory at any pointin time. In some embodiments, the statistics reconstruction module 506may follow an iterative process, with each iteration including reading asubset of dump groups whose translation entries can fit into the memory.In some embodiments, the statistics reconstruction module 506 mayreconstruct the translation table statistics by retrieving extra changesfrom the reverse translation map 304 and/or the meta-log journal 310.For instance, the extra changes are those changes to the translationtable that happened beyond a snapshot marker for the subset of dumpgroups. In some embodiments, the statistics reconstruction module 506may follow the iterative process to cover the dump groups. Since a givenlogical block uniquely maps to a single dump group, the iterativeprocess will correctly account for the translation table entries andproduce statistics those are consistent with the translation table.

FIG. 6 is a block diagram illustrating an example checkpoint basedreconstruction module 206 configured to implement the techniquesdescribed herein. A snapshot of the translation table is periodicallycaptured. In some embodiments, the snapshot includes a checkpoint valueat beginning of the snapshot, contents of a map dump table and thenon-persisted entries written out in a log format. As depicted in FIG.6, the example checkpoint based reconstruction module 206 may includethe translation table checkpoint module 602, the translation tablecheckpoint based reconstruction module 604, and the translation tablecheckpoint based statistics reconstruction module 606.

In some embodiments, the components 602, 604, and 606 are electronicallycommunicatively coupled for cooperation and communication with eachother, and are also coupled for communication with the other entities(e.g. storage device 110) of the system 100. The translation tablecheckpoint module 602 is logic or routines for generating a translationtable checkpoint. The translation table checkpoint based reconstructionmodule 604 is logic or routines for reconstruction using translationtable checkpoint. The translation table checkpoint based statisticsreconstruction module 606 is logic or routines for reconstruction ofstatistics using translation table checkpoint. In further embodiments,the translation table checkpoint module 602, the translation tablecheckpoint based reconstruction module 604, and the translation tablecheckpoint based statistics reconstruction module 606 are sets ofinstructions executable by the storage logic 104. In other embodiments,the translation table checkpoint module 602, the translation tablecheckpoint based reconstruction module 604, and the translation tablecheckpoint based statistics reconstruction module 606 are stored in thestorage logic 104 and are accessible and executable by a processor (notshown) to provide their respective functionalities.

In some embodiments, the translation table checkpoint module 602 mayimplement a checkpoint associated with a translation table snapshot withthe property that it is possible to examine the system and determinewhether a translation table snapshot was created before or after thecheckpoint. For instance, the checkpoint may include a timestampindicating a creation time of the translation table snapshot. In someembodiments, the translation table checkpoint module 602 may include thecheckpoint in the translation table snapshot and store the checkpoint inthe timestamp log 306 stored in the memory 212. In some embodiments, thetranslation table checkpoint module 602 may implement the checkpoint canbe as a free running counter denoting time. For example, the checkpoint(included in the translation table snapshot) can be a timestamp ofsufficient granularity associated with a translation table entry canallow determining older vs. newer entries.

In some embodiments, the translation table checkpoint module 602 mayimplement a checkpoint as a counter associated with reverse translationtable updates. For instance, each time a reverse translation table ispersisted in the storage device 110, the counter is incremented. Inother embodiments, the translation table checkpoint module 602 mayimplement a checkpoint as a counter associated with meta-log entries.For example, each time a new translation table entry is created andlogged in the meta-log journal 310, the counter is incremented.

In some embodiments, on a system with paged forward translation table, asubset of the forward translation table is resident in the storagedevice 110 while the other subset is resident in the memory 212 inforward translation map 302. The system 100 has continuous flow oftranslation table entries back and forth between the storage device 110and the memory 212. In such embodiments, the translation tablecheckpoint module 602 intends to capture the memory resident translationtable entries (e.g. translation table snapshot) that have not yet beenpersisted to the storage device 110 using a snapshot. This isadvantageous as the translation table checkpoint module 602 will be ableto recreate the memory resident state on boot-up post a planned orunplanned shutdown.

A snapshot of the translation table includes the translation table andall other translation table entries that are non-persisted in thestorage media (storage device 110) and need to be persisted before theycan be purged from memory 212. In some embodiments, the translationtable checkpoint module 602 periodically takes a snapshot of thetranslation table and persists it in the storage device 110. In someembodiments, the translation table checkpoint module 602 may persist acheckpoint associated with the snapshot in the timestamp log 306. In oneembodiment, updates to the translation table may happen in a time windowbetween two consecutive snapshots. The translation table checkpointmodule 602 may obtain these updates, post the last snapshot, from themeta-log journal 310 and/or the reverse translation map 304 stored inthe memory 212. In some embodiments, the translation table checkpointmodule 602 identifies the updates from the reverse translation map 304and the meta-log journal 310 based on the checkpoint.

In some embodiments, the translation table checkpoint module 602determines the current value of the checkpoint whenever a snapshot ofthe translation table is about to be taken. The translation tablecheckpoint module 602 may then determine entries in the translationtable that are non-persisted in the storage device 110. The translationtable checkpoint module 602 may write the entries to the storage device110. In some embodiments, the translation table checkpoint module 602may update the checkpoint in a map dump table associated with thetranslation table and the modified map dump table is also persisted inthe storage device 110. In some embodiments, the translation tablecheckpoint module 602 may update the checkpoint in the timestamp log306. With this flow, it is ensured that all the translation tableentries that were modified before the checkpoint are persisted in thestorage device 110 and can be retrieved from the storage device 110 on aboot-up. In some embodiments, the translation table entries that weremodified after the snapshot can be identified (in reverse map andmeta-log) with the help of the checkpoint, and selectively brought intomemory during boot.

In this system at any point of time, the entries that are non-persistedin the storage device 110, may be spread across various dump units.Hence persisting the dump units during a boot up is inefficient. Forefficient input/output, the translation table checkpoint module 602 maywrite translation table entries that are not backed up in the storagedevice 110 consecutively in a log-format, without taking into account,which dump unit they belong to. This allows the translation tableentries to be written in a consolidated form because writing translationtable entries for each dump-group separately (as 4 K-sized blocks) mayresult in wasted space as there may not be enough non-persisted maps(translation table entries) per dump-group.

In some embodiments, the translation table checkpoint basedreconstruction module 604 may receive a request to update a translationtable stored in the memory 212. In response to receiving the request,the translation table checkpoint based reconstruction module 604 mayannotate each reverse translation map 304 entry, meta-log journal 310entry, and dump unit (forward translation table chunks) with the valueassociated with a checkpoint.

In some embodiments, the translation table checkpoint basedreconstruction module 604 may locate the last snapshot on the storagedevice 110. For instance, this is resident at a well-known logicallocation. In some embodiments, the translation table checkpoint basedreconstruction module 604 may read a map dump table and restore it intomemory. This makes the location of all persisted translation tableentries available. In some embodiments, to reconstruct the in-memorystate at the time of planned/unplanned shutdown, the translation tablecheckpoint based reconstruction module 604 may start with translationtable entries that are non-persisted in the storage device 110 from thesnapshot, and may add all the entries to the in-memory translationtable. For instance, the in-memory translation table may be stored inthe forward translation map 302 and the reverse translation map 304 inthe memory.

In some embodiments, the translation table checkpoint basedreconstruction module 604 may identify the checkpoint from the map dumptable. In some embodiments, the translation table checkpoint basedreconstruction module 604 may identify the checkpoint from the timestamplog 306. For translation table entries updated beyond the snapshotassociated with the checkpoint, the translation table checkpoint basedreconstruction module 604 may scan for entries beyond the snapshotmarker from reverse translation map 304 and/or meta-log journal 310. Inone embodiment, the translation table checkpoint based reconstructionmodule 604 may selectively add the scanned entries to the translationtable only if the entry being added has a value beyond the checkpoint.The translation table checkpoint based reconstruction module 604 thusadvantageously guarantees that only those entries that were in memory atthe time of unplanned/planned shutdown gets populated in memory afterboot up too thus guaranteeing constrained memory consumption.

The translation table checkpoint based statistics reconstruction module606 may track translation table statistics at run time through in-memorycounters as and when translation table entries are updated. Forinstance, the translation table checkpoint based statisticsreconstruction module 606 may keep track of translation table statisticsusing a plurality of counters in the memory 212. In some embodiments,reconstructing translation table statistics on boot-up after anunplanned shutdown, may require translation table checkpoint basedstatistics reconstruction module 606 to complete a full scan oftranslation table entries persisted in the storage device 110.

In some embodiments, the translation table checkpoint based statisticsreconstruction module 606 may receive a request to reconstructtranslation table statistics after a planned system shutdown. Inresponse to receiving the request, the translation table checkpointbased statistics reconstruction module 606 may restore all statisticsthat are persisted into a known region on the storage device 110. Thisprovides quick start up ability for planned shutdowns.

In some embodiments, the translation table checkpoint based statisticsreconstruction module 606 may receive a request to reconstructtranslation table statistics after an unplanned system shutdown. Inresponse to receiving the request, in some embodiments, the translationtable checkpoint based statistics reconstruction module 606 mayregenerate the translation table statistics. The full translation tableincludes multiple dump groups, of which only a subset can fit into theconstrained memory at any point of time. In some embodiments, thetranslation table checkpoint based statistics reconstruction module 606may iteratively read some dump groups that can fit into the memory 212and reconstruct the statistics. In some embodiments, the translationtable checkpoint based statistics reconstruction module 606 may applyextra changes beyond the checkpoint for the dump groups under processfrom the reverse translation map 304 and/or the meta-log journal 310.Since a given logical block uniquely maps to a single dump group, thetranslation table checkpoint based statistics reconstruction module 606correctly accounts for all translation table entries and producestatistics those are consistent with the translation table.

FIG. 7 is a block diagram illustrating an example garbage collectionmodule 208 configured to implement the techniques described herein. Asdepicted in FIG. 7, the example garbage collection module 208 mayinclude the pinning module 702 and the garbage collection optimizationmodule 704.

In some embodiments, the components 702 and 704 are electronicallycommunicatively coupled for cooperation and communication with eachother, and are also coupled for communication with the other entities(e.g. storage device 110) of the system 100. The pinning module 702 islogic or routines for pinning translation table entries in the memory212. The garbage collection optimization module 704 is logic or routinesfor optimizing garbage collection in the memory 212. In furtherembodiments, the pinning module 702 and the garbage collectionoptimization module 704 are sets of instructions executable by thestorage logic 104. In other embodiments, the pinning module 702 and thegarbage collection optimization module 704 are stored in the storagelogic 104 and are accessible and executable by a processor (not shown)to provide their respective functionalities.

In some embodiments, the pinning module 702 may pin translation tableentries in the memory 212 such that the translation table entries arenot paged out unless explicitly unpinned. For instance, the pinningmodule 702 may pin translation table entries by setting, marking orflagging the translation table entry so that the translation table entrymay remain in memory 212 and is not moved to storage media 110.Unpinning refers to unmarking or unsetting the flag. In someembodiments, the pinning module 702 can be implemented using a referencecount on each translation table entry and an entry with non-zeroreference count is never paged out. For instance, in response to arequest to pin a translation table entry in the memory 212, the pinningmodule 702 may associate the translation table entry with a non-zeroreference number. In some embodiments, a pinned translation table entrycan never be purged out of the memory 212, until the pinned translationtable entry reaches an expiration time-out.

In some embodiments, typical input/output flows involve multiple lookupsof a translation table entry associated with a given logical block. Itis advantageous for the pinning module 702 to be able to serve thelookup without blocking, e.g., without involving device input/output. Insome embodiments, the pinning module 702 allows lookup and pin thelooked up translation table entry as a preparatory step. In someembodiments, the pinning module 702 may also aggregate lookup requestsusing a queue such that lookups can be done in an aggregated fashionthus optimizing on device input/output.

In some embodiments, the pinning module 702 may also perform pre-fetchdetection. For instance, in response to a pre-fetch detection request,the pinning module 702 may bring in translation table entries ahead oftime and pin them in the memory 212 for guaranteed fault free lookupsfor pre-fetched entries. The pinned entry can be associated with anexpiration time after which it is unconditionally unpinned. In someembodiments, the pinning module 702 addresses cases where pre-fetch madewrong prediction of logical blocks that are going to be accessed.

In some embodiments, garbage collection optimization module 704identifies a physical area on the storage device 110 to perform agarbage collection operation. The garbage collection optimization module704 may then query for all the logical blocks that are included in thisphysical area of the storage device 110. For instance, the queryinvolves a reverse translation map structure that maps physical locationto logical block numbers. The query further involves a validation stepwith a forward translation map structure.

In some embodiments, the reverse translation map structures are notstrictly up-to-date and hence the information from the reversetranslation map structure is validated with the forward translation mapstructure to decide on the physical locations that are still valid andneeds the data to be moved. In some embodiments, the garbage collectionoptimization module 704 may preserve attributes associated with thelogical block by querying the forward map.

Sometimes with paged translation systems, the garbage collectiongenerally happens on logical blocks that have been written sometime inthe past and hence do not have their translation table entries inmemory. For instance, a translation table entry may be paged out of thememory 212 if the translation table entry older than a threshold time.In some embodiments, the garbage collection optimization module 704 maystart garbage collection from a physical address space. For instance,the garbage collection operation does not have any locality with respectto the logical blocks.

In some embodiments, the garbage collection optimization module 704maintains a bitmap with bit per physical block in the memory 212. Since,this is bit per physical block, the size of this bitmap is limited bythe physical size of the storage device 110. In some embodiments, thegarbage collection optimization module 704 may determine that a physicalblock is assigned to a logical block and turn on the corresponding bit.In some embodiments, the garbage collection optimization module 704 maydetermine that a logical block is overwritten (hence invalidating thepreviously mapped physical block) and may turn off the correspondingbit. As an example, if Logical L1 maps to P1, then bit for P1 is turnedON and when L1 is overwritten to map to new physical block P2, the bitfor P1 is turned OFF and bit for P2 is turned ON.

In some embodiments, the garbage collection optimization module 704 mayselect a physical chunk to relocate and using the bitmap. For instance,the garbage collection optimization module 704 may filter out only thosephysical blocks that have the bit turned ON. In some embodiments, theseare the only blocks that needed to be moved since all other blocks areimplicitly holding data that has been overwritten with newer data. Also,for filtered physical blocks, all attribute information for the logicalblock may be present in the reverse translation map 304.

FIG. 8 is a block diagram illustrating an example translation tablemanagement module 210 configured to implement the techniques describedherein. As depicted in FIG. 8, the example translation table managementmodule 210 may include the translation table tracking module 802 and thetranslation table preserving module 804.

In some embodiments, the components 802 and 804 are electronicallycommunicatively coupled for cooperation and communication with eachother, and are also coupled for communication with the other entities(e.g. storage device 110) of the system 100. The translation tabletracking module 802 is logic or routines for tracking translation tableentries in the memory 212. The translation table preserving module 804is logic or routines for preserving translation table entries in thememory 212. In further embodiments, the translation table trackingmodule 802 and the translation table preserving module 804 are sets ofinstructions executable by the storage logic 104. In other embodiments,the translation table tracking module 802 and the translation tablepreserving module 804 are stored in the storage logic 104 and areaccessible and executable by a processor (not shown) to provide theirrespective functionalities.

In some embodiments, the translation table tracking module 802 maintainsstatistics on a per-dump-group basis. The translation table trackingmodule 802 counts how many translation table entries are present in eachdump group and determines how many of these translation table entriesare currently non-persisted in the storage device 110. In someembodiments, the translation table tracking module 802 also determines anumber of the translation table entries in the each dump group that arenot allowed to be purged from memory (memory 212). In some embodiments,the dump group generating module 402 generates a dump group using anumber of translation table entries.

In some embodiments, for each dump-group, the translation table trackingmodule 802 maintains a linked list pointer that allows the dump group tobe attached to a linked-list. For example, a multi-level linked listsdata structure is used to categorize the dump groups. In someembodiments, each linked list holds a threshold number of dump groupsthat satisfy a certain pre-defined criteria for that list. Thetranslation table tracking module 802 may evaluate each dump group andadd to one of the linked lists. In some embodiments, the criteria forthe linked lists is chosen to be the number of translation table entriespresent in the dump group that are not persisted in the storage device110 and a ratio between the total number of translation table entries ina dump group and the number of translation table entries present in thedump group that are non-persisted in the storage device 110.

As the number of the number of translation table entries present in thedump group that are non-persisted in the storage device 110 changes in adump group, the translation table tracking module 802 may re-evaluate ifthe dump group needs to be migrated to some other linked list. In someembodiments, each of the dump groups is loosely sorted in its respectivelinked list. It is advantageous because the system does not need to scanthe entire system if it needs to page-out some dump group. Instead, thesystem chooses one of the dump groups from the linked list having thehighest ratio. This not only ensures that the dumping operation isefficient, but the selection logic also has constant time-complexity.

In some embodiments, depending on a translation table implementationmethod and the data structures used, different unrelated translationtable entries may be grouped in the same chunk of the translation table.For example, a hash function may be used to determine which dump unit agiven translation table entry should belong to.

A dump unit includes of multiple translation table entries. Thetranslation table preserving module 804 generates fixed sized nodesattached to each dump unit with each fixed size node holding fixednumber of translation table entries. In some embodiments, thetranslation table preserving module 804 may preserve translation tableentries in the memory 212 by dividing the dump unit in two groups ofnodes. One group holding the nodes including the frequently accessedtranslation table entries (also referred to as hot group), and the othergroup including nodes holding the remaining translation table entries(also referred to as cold group). In some embodiments, the translationtable preserving module 804 may determine the number of nodes in the hotgroup based on the ratio of translation table entries in memory to thetranslation table entries in storage media. For instance, thetranslation table preserving module 804 determines a first number ofnodes including frequently accessed translation table entries and asecond number of groups including rarely accessed translation tableentries. In some embodiments, in response to a memory reclaim request,the translation table preserving module 804 may select the second numberof groups to purge out of the memory 212.

In some embodiments, the translation table preserving module 804 mayassign a bit to each translation table entry in the hot node (recentaccess bit). The recent access bit is turned ON whenever the translationtable entry associated with the recent access bit is accessed. In someembodiments, the translation table preserving module 804 analyzes thetranslation table entries in the hot group in a round-robin fashion. Inresponse to determining that a bit is set, the translation tablepreserving module 804 may clear the bit and skip it. In someembodiments, the translation table preserving module 804 may repeat thisfor each eviction cycle. In some embodiments, when the translation tablepreserving module 804 finds a translation table entry that has the bitcleared, the translation table preserving module 804 may select thattranslation table entry to be evicted.

This scanning for the translation table entries is round-robin toprovide fairness is ensured as each translation table entry is given atleast one chance (clearing the bit from 1 to 0) to survive beforeeviction. The advantage is that as long as a translation table entrycontinues to get accessed, it will remain in the hot group withoutgetting evicted ever. In some embodiments, the translation tablepreserving module 804 evicts a translation table entry from a hot groupand may move it into the rarely accessed (cold) group. In response to amemory-reclaim request, the translation table preserving module 804 mayevict translation tables from the nodes in the cold group. Thesetranslation table entries are then removed from the memory 212.

In some embodiments, when a translation table entry is looked up by thetranslation table preserving module 804, the translation table entry maybe present in the storage device 110, the translation table entry may bepresent in the cold node (node including rarely accessed translationtable entries) or the translation table entry may already be present inthe hot node (node including frequently accessed translation tableentries).

For instance, if the translation table entry is present in the storagedevice 110, the translation table entry is read from the storage device110 and brought into the hot node evicting one of the least recentlyaccessed translation table entries. If the translation table entry ispresent in the cold node, the translation table preserving module 804may swap the translation table entry with the least recently accessedentry in hot node. If the translation table entry is already present inthe hot node, the translation table preserving module 804 may set therecent access bit for the translation table entry.

In some embodiments, translation table entries may be created in thesystem 100 as an after effect of any write operation on the system. Forexample, this write operation may include user writes as well as writescoming in from internal management operations like garbage collection.Typically, the garbage collection happens on rarely accessed translationtable entries. In some embodiments, the translation table preservingmodule 804 may utilize the garbage collection as a hint to effectivelysegregate all garbage collection translation table entries as rarelyaccessed translation table entries.

In some embodiments, the translation table preserving module 804 mayutilize hints from applications exhibiting access patterns to determinethe frequently accessed translation table entries. For example,applications exhibiting access patterns may involve access types wheremost recently accessed translation table entry is not accessed for longduration (e.g. a sequential write to a file). This would result in wrongtranslation table entries being tracked as ‘frequently accessed’ (hot).In such embodiments, the application may provide a hint to thetranslation table preserving module 804 identifying the translationtable entry was accessed once. In some embodiments, the translationtable preserving module 804 may utilize the hint to avoid classifyingsuch translation table entries as frequently accessed.

FIG. 9 is an example graphical representation illustrating oneembodiment of a unified paging structure for translation tables. In theexample of FIG. 9, the dump group 902 includes dump unit 0, dump 1, dumpunit 2, dump unit 3 . . . dump unit n-1. The dump group 902 representsan array of dump units and is resident on the memory 212 as illustratedin the FIG. 9. In the example of FIG. 9, a single array of dump units isshown, but there could be several arrays of dump units. The logicalspace in the storage device 110 is allocated to each dump group. In someembodiments, the logical space may be divided into buckets (dump units)based on a hash function on a logical block number. In some embodiments,a fixed number (4-8) of dump units are grouped into dump groups. Eachdump group is assigned a fixed range of logical space. The logical spaceallocation array 904 includes the reserved logical space allocated toeach dump group. In the example of FIG. 9, the reserved logical spacefor dump group 0 is the array 922.

The array 922 has dump 0 906 and dump 1 908. Dump 0 906 refers to theprevious entries associated with the dump units resident in dump group902 in the memory 212. Dump 1 906 refers to the most recent entriesassociated with the dump units resident in dump group 902 in the memory212. In the example of FIG. 9, dump 0 906 includes header and data fordump unit 0, header and data for dump unit 1, data for dump unit 1,header and data for dump unit 2, header and data for dump unit 3.

In the example of FIG. 9, dump 1 908 includes header and data for dumpunit 0 and header and data for dump unit 1. The elements of dump 1 908represents the active entries associated with the dump unit 0 and thedump unit 1 in the dump group 902 in the memory 212.

As illustrated in FIG. 9, the dump unit 0 in the dump group 902maintains a connection 910 with the header and data for dump unit 0 indump 1 908. Similarly, the dump unit 1 in the dump group 902 maintains aconnection 912 with the header and data for dump unit 1 in dump 1 908,the dump unit 2 in the dump group 902 maintains a connection 914 withthe header and data for dump unit 2 in dump 0 906, and the dump unit 3in the dump group 902 maintains a connection 916 with the header anddata for dump unit 3 in dump 0 906. A reverse linked list (not shown butrepresented by 918 and 920) connects all previous entries associatedwith the dump unit in the storage device 110. The dumps for a dump unitcan be iterated through the reverse linked list stored on the storagedevice 110. In the example of FIG. 9, the most recent entry associatedto dump unit 0 stored in dump 1 908 is linked to a previous entryassociated to dump unit 0 stored in dump 0 906 via link 920. Similarly,the most recent entry associated to dump unit 1 stored in dump 1 908 islinked to a previous entry associated to dump unit 1 stored in dump 0906 via link 918.

FIG. 10A is a flow chart of an example method 1000 for implementation ofgeneral unified paging of translation tables. The method 1000 may beginby receiving 1002 a first translation table entry for a logical block.In some embodiments, the input buffer 220 receives the first translationtable entry as portion of the data stream.

Next, the method 1000 may continue by allocating 1004 a logical space inmemory for an array of dump units. In some embodiments, the dump groupgenerating module 402 may receive the first translation table entry fromthe input buffer 220 and perform its functions.

In one embodiment, a dump unit is a smallest unit at which the unifiedpaging module 202 maintains mapping from logical block to storage medialocation where translation entries are dumped. In one embodiment, a dumpunit can also be referred to as a bucket. In some embodiments, in orderto have efficient media lookup, the dump unit may be as small aspossible so that minimal input/output would need to be done to fetch thetranslation entry for a given logical block, during a read operation.

A dump group may also be referred to as a bucket group. In oneembodiment, the dump group is a collection of fixed number of dump unitsthat when dumped are dumped together for write input/output efficiency.Each dump group is assigned a fixed range of logical space in memory. Insome embodiments, the logical space reserved for translation table dumpsare divided into fixed size regions with each region assigned to a dumpgroup. This division provides ease of management, as discussed elsewhereherein.

Next, the method 1000 may advance by mapping 1006 the first translationtable entry to a first dump unit based on a hash function associatedwith the logical block, the first dump unit included in the array ofdump units. In some embodiments, the dump group generating module 402may map the first translation table entry using a hash function of alogical block number of the logical block of the first translationtable. A logical block is mapped to a particular dump unit using thehash function. The hash function is selected to well distribute logicalblocks to various dump units as well as assign a few successive logicalblocks to same dump unit to get locality benefit for typical workloads.For example, a hash function Dump_unit(L)=L mod 512, maps successivelogical block number to the same or the next dump unit.

The method 1000 may then continue by identifying 1008 a secondtranslation table entry for the logical block in the first dump unit,wherein the second translation table entry also being stored in astorage device 110. The second translation table entry associated withthe dump unit can be stored in the storage device 110. In oneembodiment, the second translation table entry may also be referred toas the most recent translation table entry associated with the dumpunit. In some embodiments, the most recent translation table entryrefers to the most recent location in the storage media 110, storing atranslation table entry data (e.g. dump) associated with the dump unit.In some embodiments, the above discussed can be applied in relation tosparse and dense translation table entries, and as will be furtherdiscussed below. In some embodiments, the operations in step 1008 can beperformed by the dump group generating module 402 in cooperation withthe input buffer 220 and/or one or more other entities of the system100, as discussed elsewhere herein.

The method 1000 may then continue by generating 1010 a linked list inthe storage device 110 from the second translation table entryassociated with the first dump unit, the linked list identifyingprevious translation table entries associated with the logical block. Insome embodiments, the linked list may be a reverse linked list. In someembodiments, a given dump unit may be dumped multiple times based onusage pattern with each dump unit having a disjoint set of translationtable entries. To keep track of all active locations where a dump unitis dumped, the reverse linked list may start from the most recentlocation associated with the dump unit. In some embodiments, theoperations in step 1010 can be performed by the reverse linked listgenerating module 404 in cooperation with the dump group generatingmodule 402 and/or one or more other entities of the system 100, asdiscussed elsewhere herein.

FIG. 10B is a flow chart of an example method 1030 for implementing awrite request on a unified paged structure of translation tables. Themethod 1030 may begin by receiving 1032 a write request for a logicalblock, wherein the write request includes a new translation table entryfor the logical block.

Next, the method 1030 continues by identifying 1034 the first dump unitassociated with the logical block. In some embodiments, the dump groupgenerating module 402 identifies a dump unit associated with the logicalblock. In some embodiments, a write request may be received on a logicalblock that does not have its translation entry in memory. In that case,the dump group generating module 402 may fetch the on-media translationentry and then modify the entry corresponding to the new location wheredata is written. For example, the dump group generating module 402retrieves the dump unit associated with the logical block from thestorage device 110 and sends it to memory 212.

The method 1030 may then continue by updating 1036 the secondtranslation table entry in the storage device 110 with the firsttranslation table entry from the first dump unit. In one embodiment, thedump group generating module 402 may identify the second translationtable entry (most recent translation table entry) associated with thelogical block on the storage device 110 to perform operations therefrom.

Next, the method 1030 may then continue by storing 1038 the newtranslation table entry in the first dump unit. In one embodiment, thedump group generating module 402 may store the new translation tableentry in the first dump unit. In some embodiments, the dump groupgenerating module 402 may perform a write operation on the dump unit inthe memory 212.

The method 1030 may then continue by updating 1040 the linked list inthe storage device 110, the linked list referencing the updated secondtranslation table entry in the storage device 110 through previoustranslation table entries associated with the logical block. In someembodiments, the linked list may be a reverse linked list. In oneembodiment, the dump group generating module 402 may update the reverselinked list on the storage device 110 to perform operations therefrom.

FIGS. 10C and 10D are flow charts of an example method 1050 forimplementing a read request from a unified paged structure oftranslation tables. The method 1050 may begin by receiving 1052 a readrequest for a first translation table entry associated with a logicalblock. In some embodiments, the operations in step 1052 may be performedby dump group generating module 402 in cooperation with the input buffer220 and one or more other entities of the storage logic 104. Forinstance, the dump group generating module 402 may receive the readrequest from the input buffer 220.

Next, the method 1050 advances by identifying 1054 a dump unitassociated with the logical block using a hash function. The logicalblock may be mapped to a dump unit using the hash function. The hashfunction may be selected to well distribute logical blocks to variousdump units as well as assign a few successive logical blocks to samedump unit to get locality benefit. In one embodiment, the dump groupgenerating module 402 identifies the dump unit associated with thelogical block using the hash function.

Next, the method 1050 advances by determining 1056 a dump groupassociated with the dump unit. In one embodiment, the dump groupgenerating module 402 identifies a logical space reserved for the dumpgroup. In one embodiment, the dump group generating module 402identifies the dump group associated with the dump unit.

Next, the method 1050 can continue by identifying 1058 a secondtranslation table entry associated with the dump unit in a storagedevice 110. In some embodiments, the second translation table entry maybe a most recent translation table entry associated with the logicalblock stored in the storage device 110.

Referring now to FIG. 10D, the method 1050 advances by determining 1060that the second translation table entry does not match with the readrequest. In one embodiment, the dump group generating module 402 maydetermine that the most recent translation table entry associated withthe logical block does not match with the read request. For instance,the most recent translation table entry associated with the logicalblock may be stored in the storage device 110.

Next, the method 1050 can continue by retrieving 1062 a previoustranslation table entry associated with the dump unit using a reverselinked list from the storage device 110. In some embodiments, thereverse linked list generating module 404 may retrieve the previoustranslation table entry associated with the dump unit.

Next, the method 1050 can continue by determining whether 1064 theretrieved translation table entry matches the read request. In someembodiments, the dump group generating module 402 may identify that theretrieved translation table entry matches the translation table entry inthe read request.

Responsive to determining that the retrieved translation table entrydoes not match the read request, the method 1050 can continuesretrieving 1062 a previous translation table entry associated with thedump unit using a reverse linked list.

Responsive to determining that the retrieved translation table entrymatches the read request, the method 1050 may continue by outputting1066 the retrieved translation table entry from the storage device 110.The operations in step 1066 can be performed by the dump groupgenerating module 402 in cooperation with one or more other entities ofthe storage logic 104.

FIG. 11A is a flow chart of an example method 1100 for maintainingsnapshot markers. The method 1100 may initiate by receiving 1102 arequest to create a translation table entry. For instance, the unifiedpaging module 202 may receive a request to create a translation tableentry. In some embodiments, the request to create a translation tableentry may be associated with, but not limited to, a request to create aforward translation table entry or a request to create a reversetranslation table entry. In some embodiments, the dump group generatingmodule 402 may create the translation table entry. In furtherembodiments, the operations in step 1102 may be performed by the dumpgroup generating module 402 in cooperation with the input buffer 220 andone or more other entities of the system 100, as discussed elsewhereherein.

Next, the method 1100 may continue by logging 1104 the translation tableentry in a meta-log 310.

In one embodiment, the meta-log 310 may be stored in the meta-logjournal 310 in the memory 212. In further embodiments, the operations instep 1104 may be performed by the meta-log journal 310 stored in thememory 212 in cooperation with the input buffer 220 and one or moreother entities of the data reduction unit 210.

The method 1100 may advance by incrementing 1106 a first snapshot markerassociated with the meta-log 310. In some embodiments, a snapshot markerhas a property of examining the system 100 and determining whether atranslation table entry was created before or after the snapshot marker.In some embodiments, the timestamp log 306 stored in the memory 212stores one or more snapshot markers associated with a translation tableentry and increments a snapshot marker associated with a meta-log, upondetermining that the translation table entry has been logged in themeta-log journal 310. In one embodiment, the snapshot marker can includea free running counter denoting time. For instance, the snapshot markercan include a timestamp of sufficient granularity associated with atranslation table entry. In one embodiment, the snapshot marker maydetermine older vs. newer entries.

In some embodiments, the snapshot marker associated with a meta-log caninclude a free running counter associated with meta-log entries. Forinstance, each time a new translation table entry is created, thecounter is incremented. In one embodiment, the timestamp log 306 maydetermine that the write request is recorded by the meta-log journal 310and may increment the snapshot marker associated with the meta-log.Further, in some embodiments, the incremented first snapshot markerassociated with the meta-log may be stored in the timestamp log 306 inthe memory 212.

The method 1100 may then continue by updating 1106 a reverse translationtable with the translation table entry. In some embodiments, updates tothe reverse translation map 304 may be periodically persisted in thestorage device 110. In some embodiments, the reverse translation map 304stored on the memory 212 maintains a reverse translation table includinga plurality of reverse translation table entries. In furtherembodiments, the translation table entry may also be stored in theforward translation map 302. In some embodiments, the forwardtranslation map 302 may be persisted in the storage device 110 wheneverthere is memory pressure or a threshold number of translation tableentries have been accumulated.

Next, the method 1100 may determine 1110 whether the updated reversetranslation table is persisted in the storage device 110.

In one embodiment, the unified paging module 202 may receive translationtable entry from the input buffer 220 and sends the translation tableentry to the reverse translation map 304 stored in the memory 212. Insome embodiments, the unified paging module 202 in cooperation with thereverse translation map 304 may determine whether the updated reversetranslation table is persisted in the storage device 110.

In response to determining that the updated reverse translation table ispersisted in the storage device 110, the method 1100 may advance byincrementing 1112 a second snapshot marker associated with the reversetranslation table. In some embodiments, the second snapshot marker maybe a construct associated with the reverse translation table, thatcaptures a point-in-time allowing unambiguous determination of whether aparticular reverse translation table update happened before or after thesecond snapshot marker. In some embodiments, the timestamp log 306stored in the memory 212 stores one or more snapshot markers associatedwith a translation table entry.

In some embodiments, the second snapshot marker associated with thereverse translation map 304 can be a counter associated with reversetranslation table updates. For instance, each time a reverse translationtable is persisted is the storage device 110, the counter isincremented. In one embodiment, the timestamp log 306 may store thefirst snapshot marker associated with the meta-log journal 310 and thesecond snapshot marker associated with the reverse translation map 304.Further, in some embodiments, a snapshot marker associated with theforward translation map 302 may also be stored in the timestamp log 306in the memory 212. In some embodiments, the first snapshot marker andthe second snapshot marker may be combined to reconstruct a translationtable after an unplanned shutdown.

FIG. 11B is a flow chart of an example method 1150 for reconstructing atranslation table using snapshot markers under constrained memory. Themethod 1150 may begin by identifying 1152 a plurality of dump unitsassociated with a translation table in the storage device 110. In someembodiments, the reconstruction under constrained memory module 504 mayreceive a request to reconstruct the translation table. In someembodiments, the reconstruction under constrained memory module 504 mayreceive the request to reconstruct the translation table after anunplanned system shut down. In one embodiment, the reconstruction underconstrained memory module 504 identifies the plurality of dump unitsassociated with the translation table in cooperation with the dump groupgenerating module 402. In some embodiments, the reconstruction underconstrained memory module 504 receives the dump units included in a dumpgroup stored in the storage device 110. The reconstruction underconstrained memory module 504 receives the last persisted contentsassociated with the dump group.

Responsive to identifying the plurality of dump units associated withthe translation table in the storage device 110, the method 1150 cancontinue by determining 1154 a plurality of snapshot markers associatedwith the plurality of dump units. In one embodiment, the reconstructionunder constrained memory module 504 may determine the plurality ofsnapshot markers associated with the plurality of dump units based on asnapshot marker associated with each dump unit. For instance, thereconstruction under constrained memory module 504 may identify, theplurality of snapshot markers from the timestamp log 306 stored in thememory 212. In another embodiment, the plurality of snapshot markersassociated with the plurality of dump units may also be stored in thestorage device 110.

Next, the method 1150 may advance by calculating 1156 a first value of afirst snapshot marker from the plurality of snapshot markers in thestorage device 110. For instance, the reconstruction under constrainedmemory module 504 calculates a minimum value of the first snapshotmarker from a first plurality of snapshot markers associated with themeta-log and a second plurality of snapshot marker associated with thereverse translation table. In one embodiment, the reconstruction underconstrained memory module 504 computes the minimum value of the firstsnapshot marker. For instance, the reconstruction under constrainedmemory module 504 retrieves the plurality of snapshot markers associatedwith the plurality of dump units from the timestamp log 306 stored inthe memory 212. Next, the reconstruction under constrained memory module504 computes a minimum value from the plurality of snapshot markers. Thereconstruction under constrained memory module 504 also determines thatthe minimum value is associated with the first snapshot marker.

The method 1150 may advance by identifying 1158 a second snapshot markerfrom an additional source, the second snapshot marker having a secondvalue after or greater than the first value. In some embodiments, thesecond value is greater than the first value because a counter isincremented and the value of the counter is used for the timestamp ofthe snapshot maker. In some embodiments, the additional source may bethe meta-log journal 310 or the reverse translation map 304. In oneembodiment, the reconstruction under constrained memory module 504receives the second snapshot marker from the timestamp log 306 stored inthe memory 212. For instance, the reconstruction under constrainedmemory module 504 computes the second value associated with the secondsnapshot marker and determines that the second value is above a minimumvalue of the first snapshot marker.

Lastly, the method 1150 may continue by retrieving 1160 a dump unitassociated with the second snapshot marker from the additional sourceand reconstruct the translation table using the dump unit. In oneembodiment, the reconstruction under constrained memory module 504 incooperation with the timestamp log 306 retrieves the dump unitassociated with the second snapshot marker from the additional source.For instance, the reconstruction under constrained memory module 504scans entries beyond the minimum snapshot marker from the reversetranslation map 304 and/or the meta-log journal 310. In someembodiments, the reconstruction under constrained memory module 504reconstructs the translation table using the retrieved dump unit. Insome embodiments, the operations in step 1162 may be performed by thereconstruction under constrained memory module 504 in cooperation withthe timestamp log 306, reverse translation map 304 and meta-log journal310 and one or more other entities of the storage logic 104.

FIGS. 12A and 12B are flow charts of an example method 1200 for startingup under constrained memory conditions using two dump groups. The method1200 may begin by receiving 1202 a first logical block entry for a firstdump group and a second logical block entry for a second dump group inmemory. In some embodiments, the operations in step 1202 may beperformed by the unified paging module 202 in cooperation with the inputbuffer 220 and one or more other entities of the storage logic 104. Forinstance, the unified paging module 202 receives the first logical blockentry and the second logical block entry for adding to the reversetranslation map 304 stored in the memory 212.

Next, the method 1200 advances by storing 1204 the first logical blockentry for the first dump group and the second logical block entry forthe second dump group in a reverse translation table. In one embodiment,the first logical block entry for the first dump group and the secondlogical block entry for the second dump group may be stored in thereverse translation map 304 stored in the memory 212.

Next, the method 1200 advances by determining 1206 a first sequencenumber associated with the stored first logical block entry and thestored second logical block entry in the reverse translation table. Inone embodiment, the unified paging module 220 determines the firstsequence number associated with the stored first logical block entry andthe stored second logical block entry and logs the first sequence numberin the timestamp log 306 stored in the memory 212. For instance, thefirst sequence number associated with the stored first logical blockentry and the stored second logical block entry may be a snapshot markerdetermining a timestamp associated with the first logical block and thesecond logical block.

Responsive to determining the first sequence number associated with thestored first logical block entry and the stored second logical blockentry, the method 1200 can continue by persisting 1208 the first logicalblock entry for the first dump group in a storage media 110. In someembodiments, the unified paging module 202 may store the first dumpgroup in the storage device 110.

Next, the method 1200 may receive 1210 a third logical block entry forthe first dump group and a fourth logical block entry for the seconddump group in the memory. In some embodiments, the operations in step1210 may also be performed by the unified paging module 202 incooperation with the input buffer 220 and one or more other entities ofthe storage logic 104. For instance, the unified paging module 202receives the third logical block entry for the first dump group and thefourth logical block entry for the second dump group for adding to thereverse translation map 304 stored in the memory 212.

Next, the method 1200 advances by storing 1212 the third logical blockentry for the first dump group and the fourth logical block entry forthe second dump group in the reverse translation table. In oneembodiment, the third logical block entry for the first dump group andthe fourth logical block entry for the second dump group may be storedin the reverse translation map 304 stored in the memory 212.

Referring now to FIG. 12B, the method 1200 advances by determining 1214a second sequence number associated with the stored third logical blockentry and the stored fourth logical block entry in the reversetranslation table. In one embodiment, the unified paging module 220determines the second sequence number associated with the stored thirdlogical block entry and the stored fourth logical block entry and logsthe second sequence number in the timestamp log 306 stored in the memory212. For instance, the second sequence number associated with the secondsequence number associated with the stored third logical block entry andthe stored fourth logical block entry may be a snapshot markerdetermining a timestamp associated with the second sequence numberassociated with the third logical block and the fourth logical block.

Responsive to determining the second sequence number associated with thestored third logical block entry and the stored fourth logical blockentry, the method 1200 can continue by persisting 1216 the secondlogical block entry for the second dump group and the fourth logicalblock entry for the second dump group in the storage media 110. In someembodiments, the unified paging module 202 may store the second dumpgroup in the storage device 110. In some embodiments, memorycorresponding to the second dump group is reclaimed after determiningthat the second dump group is persisted in the storage device 110. Thesteps 1202-1216 describe an ongoing process for maintaining a snapshotmarkers for dump groups, and may be performed repeatedly in someembodiment before the method proceeds to block 1218.

The method 1200 may continue by receiving 1218 a request to reconstructa dump group table in for the first dump group and the second dumpgroup. In one embodiment, the reconstruction under constrained memorymodule 504 receives a request to reconstruct the dump group table forthe first dump group and the second dump group. The reconstruction underconstrained memory module 504 may receive the request to reconstructafter an unplanned shutdown and system restart. Next, the method 1200advances by retrieving 1220 the first sequence number as a snapshotmarker for the first dump group and the second sequence number as thesnapshot marker for the second dump group. The operations in step 1220may be performed by the reconstruction under constrained memory module504 in cooperation with the timestamp log 306 and one or more otherentities of the storage logic 104.

Next, the method 1200 may continue by identifying 1222 that the secondsequence number is greater than the first sequence number. In oneembodiment, reconstruction under constrained memory module 504 retrievesthe first sequence number and the second sequence number from thetimestamp log 306 stored in the memory 212.

Lastly, the method 1200 may continue by retrieving 1224 the thirdlogical block entry for the first dump group associated with the secondsequence number from an additional source. In one embodiment,reconstruction under constrained memory module 504 retrieves the thirdlogical block entry for the first dump group from the reversetranslation map 304 stored in the memory 212. In another embodiment,reconstruction under constrained memory module 504 retrieves the thirdlogical block entry for the first dump group from the meta-log journal310 stored in the memory 212. The operations in step 1224 can beperformed by the reconstruction under constrained memory module 504 incooperation with one or more other entities of the storage logic 104.

FIG. 13A is a flow chart of an example method 1300 for maintainingtranslation table checkpoints. In some embodiments, the method 1300 mayinitiate periodically after a threshold time interval. In some otherembodiments, the method 1300 may initiate after receiving a request tomaintain checkpoints associated with translation table. The method 1300may initiate by receiving 1302 a request to capture a snapshot of atranslation table in memory 212. For instance, the translation tablecheckpoint module 602 may receive the request to capture the snapshot ofthe translation table. In some embodiments, the snapshot of thetranslation table includes of a map dump table and all a translationtable entries that are non-persisted in the storage device 110 and needto be persisted before they can be purged from memory 212. In someembodiments, the method 1300 periodically takes the snapshot of thetranslation table and persists it in the storage device 110. In furtherembodiments, the operations in step 1302 may be performed by thetranslation table checkpoint module 602 in cooperation with one or moreother entities of the system 100.

Next, the method 1300 may continue by determining 1304 a value of acheckpoint associated with the translation table. In some embodiments,the value of the checkpoint associated with the translation table may bea monotonically increasing number. In some embodiments, the translationtable checkpoint module 602 may determine the value of the checkpointassociated with the translation table from the timestamp log 306 storedin the memory 212.

The method 1300 may then continue by identifying 1306 a plurality oftranslation table entries from the translation table, the plurality oftranslation table entries being dirty entries. In some embodiments, theplurality of translation table entries are not persisted in the storagedevice 110. In some embodiments, the reverse translation map 304 storedon the memory 212 maintains a reverse translation table including aplurality of reverse translation table entries. In further embodiments,the translation table entry may also be stored in the forwardtranslation map 302. In some embodiments, the forward translation map302 may be persisted in the storage device 110 whenever there is arequest to free up memory space or whenever a threshold number oftranslation table entries have been accumulated.

Next, the method 1300 may persist 1308 the plurality of translationtable entries in the storage device 110.

The method 1300 may advance by incrementing 1310 the value of thecheckpoint associated with the translation table. In some embodiments,the checkpoint may be a construct associated with the reversetranslation table, that captures a point-in-time allowing unambiguousdetermination of whether a particular reverse translation table updatehappened before or after the checkpoint. In some embodiments, thetimestamp log 306 stored in the memory 212 stores the value of thecheckpoint associated with the translation table.

FIG. 13B is a flow chart of an example method 1350 for reconstructing atranslation table using translation table checkpoints. The method 1350may initiate by receiving 1352 a request to reconstruct a translationtable in memory 212. For instance, the translation table checkpointbased reconstruction module 604 may receive the request to reconstruct atranslation table in the memory 212. In some embodiments, the operationsin step 1352 may be performed by the translation table checkpoint basedreconstruction module 604 in cooperation with the timestamp log 306 andone or more other entities of the system 100, as discussed elsewhereherein.

Next, the method 1350 may continue by identifying 1354 a first snapshotassociated with the translation table in a storage device 110. Forinstance, the first snapshot may be a most recent snapshot of thetranslation table persisted in the storage device 110. In someembodiments, translation table checkpoint based reconstruction module604 may identify the first snapshot associated with the translationtable in the storage device 110.

The method 1350 may advance by determining 1356 a first value of a firstcheckpoint associated with the first snapshot. In some embodiments, thetranslation table checkpoint based reconstruction module 604 maydetermine the first value of the first checkpoint associated with thefirst snapshot from the timestamp log 306 stored in the memory 212. Forinstance, the first value of the first checkpoint may be a value of acounter associated with the translation table snapshot.

The method 1350 may then continue by receiving 1358 a second value of asecond checkpoint associated with a translation table entry from anadditional source. In some embodiments, the translation table checkpointbased reconstruction module 604 may receive the second value of thesecond checkpoint associated with a translation table entry from anadditional source. The additional source may be the reverse translationmap 304 and the meta-log journal 310 stored in the memory 212.

Next, the method 1350 may determine 1360 whether the second value of thesecond checkpoint is after (or greater) the first value of the firstcheckpoint. In one embodiment, the translation table checkpoint basedreconstruction module 604 may determine whether the second value of thesecond checkpoint is greater than the first value of the firstcheckpoint. In some embodiments, the first checkpoint may indicate afirst timestamp associated with the first snapshot and the secondcheckpoint may indicate a second timestamp associated with the secondsnapshot. In some embodiments, the operations in step 1360 may beperformed by the translation table checkpoint based reconstructionmodule 604 in cooperation with the timestamp log 310 and one or moreother entities of the system 100, as discussed elsewhere herein.

In response to determining that the second value of the secondcheckpoint is after or greater than the first value of the firstcheckpoint, the method 1350 may continue by retrieving 1362 thetranslation table entry associated with the second checkpoint from theadditional source and reconstruct the translation table using thetranslation table entry associated with the second checkpoint. In someembodiments, the translation table checkpoint based reconstructionmodule 604 may retrieve the translation table entry associated with thesecond checkpoint from the reverse translation map 304 and the timestamplog 310.

FIG. 14A is a flow chart of an example method for maintaining a bitmap.The method 1400 may initiate by receiving 1402 a request to map a firstphysical block to a first logical block. The request to map the firstphysical block to the first logical block may be in response to a writerequest. A write request allocates a new physical block to the logicalblock were the data being written will be stored. In other instances,the garbage collection optimization module 704 may receive a request tomap the first physical block to the first logical block. In someembodiments, the operations in step 1402 may be performed by the garbagecollection optimization module 704 in cooperation with the bitmap 308and one or more other entities of the system 100, as discussed elsewhereherein.

Next, the method 1400 may continue by assigning 1404 an ON status to afirst bit associated with the first physical block. In one embodiment,the ON status associated with the first bit may be stored in the bitmap308 in the memory 212. In some embodiments, the garbage collectionoptimization module 704 may assign an ON status to a bit correspondingto a physical block, if an active mapping exists between the physicalblock and a logical block.

The method 1400 may advance by updating 1406 a bitmap using the ONstatus of the first bit. In some embodiments, the garbage collectionoptimization module 704 may update the bitmap 308 stored in the memory212 with the status of the first bit.

The method 1400 may then continue by receiving 1408 an overwritingrequest for the first logical block. For instance, the overwrite requestfor the first logical block may be in response to a move request, adelete request, or a modify request associated with the first logicalblock. In some embodiments, the garbage collection optimization module704 may receive the overwriting request for the first logical block. Theoverwriting request may include a request to create a new mapping of thefirst logical block.

Next, the method 1400 may map 1410 a second physical block to the firstlogical block. In one embodiment, the garbage collection optimizationmodule 704 may receive a request to map the second physical block to thefirst logical block. In some embodiments, the operations in step 1410may be performed by the garbage collection optimization module 704 incooperation with the bitmap 308 and one or more other entities of thesystem 100, as discussed elsewhere herein.

Next, the method 1400 may continue by assigning 1412 an OFF status tothe first bit associated with the first physical block. In oneembodiment, the OFF status associated with the first bit may be storedin the bitmap 308 in the memory 212. In some embodiments, the garbagecollection optimization module 704 may assign an OFF status to a bitcorresponding to a physical block, if no active mapping exists betweenthe physical block and a logical block.

The method 1400 may then continue by assigning 1414 the ON status to asecond bit associated with the second physical block. In one embodiment,the ON status associated with the second bit may be stored in the bitmap308 in the memory 212.

Next, the method 1400 may update 1416 the bitmap using the OFF status ofthe first bit and the on status of the second bit. In some embodiments,the garbage collection optimization module 704 may update the bitmap 308stored in the memory 212 with the status of the first bit and the secondbit. In some embodiments, the bitmap 308 may be periodically persistedin the storage device 110.

FIG. 14B is a flow chart of an example method 1450 for garbagecollection optimization. The method 1450 may initiate by receiving 1452a request for garbage collection. For instance, the garbage collectionoptimization module 704 may receive a request for garbage collection inthe memory 212. In some embodiments, the operations in step 1452 may beperformed by the garbage collection optimization module 704 incooperation with the bitmap 308 and one or more other entities of thesystem 100, as discussed elsewhere herein.

Responsive to the request, the method 1450 may continue by identifying1454 a range of physical blocks in a storage device 110. In oneembodiment, the garbage collection optimization module 704 may identifya chunk of physical blocks in the storage device 110.

The method 1450 may then continue by querying 1456 a bitmap, the bitmaphaving a bit for each physical block in the range of physical blocks. Inone embodiment, the garbage collection optimization module 704 may querythe bitmap 308 in the memory 212. In some embodiments, the bitmap mayinclude a bit for each physical block of the storage device 110. In someembodiments, the size of the bitmap corresponds to a physical size ofthe storage device 110.

The method 1450 may advance determining 1458 a status associated withthe bit for each physical block in the range of physical blocks from thebitmap. In some embodiments, the garbage collection optimization module704 may determine the status associated with each bit associated witheach physical block in the range of physical blocks from the bitmap 308stored in the memory 212. In some embodiments, the status is determinedone bit at at time. Next, the method 1450 determines whether the bit isturned ON. If not, the method 1450 proceeds to block 1463 as will bedescribed below. If the bit is turned ON, then the method 1450 may thencontinue by adding 1462 a physical block associated with the bit to alist of physical blocks for relocation. In some embodiments, the garbagecollection optimization module 704 in response to a garbage collectionrequest, may select the list of physical blocks for relocation from thestorage device 110.

After block 1462 or block 1460, the method 1450 determines 1463 whetherthere are additional bits in the bitmap 308 whose status needs to bedetermined. If so, the method 1450 may then return to block 1458 todetermine the status of another bit in the bitmap 308 and perform block1460, 1462 and 1463 for that bit. The process continues until the statuseach bit in the bitmap 308 has been determined. If the method 1450determines 1463 there is not another bit in the bitmap 308 to whosestatus needs to be determined, the method 1450 proceeds to block 1464where the list of physical blocks identified in block 1462 are relocated1464.

FIGS. 15A and 15B are example graphical representations 1500 to show howpaged translation maps are preserved in the memory 212 to increase theirusage. As depicted in FIG. 15A, a first node (hot node) 1502 may includelogical blocks L1, L5, L9 and L13 as illustrated. The first node 1502may be a first chunk of the memory 212. For instance, the first node1502 can be associated with a first group of logical blocks and can bestored in the memory 212. The first node 1502 is the hot node meaningthat it includes frequently accessed logical blocks. The first node 1502includes frequently accessed logical blocks L1, L5, L9 and L13. Thefirst node 1502 includes a pointer 1508 pointing at the next entry to bereplaced in the first node 1502. In some embodiments, a frequentlyaccessed logical block is determined using a status of an access bitassociated with the frequently accessed logical block. For example, theaccess bit associated with the frequently accessed logical block has anON status. The next entry to replace pointer 1508 points to a lessfrequently used accessed logical block within the hot node. Forinstance, the next entry to replace pointer 1508 may point to a logicalblock which will be relocated from the first (hot) node 1502 if a newlogical block (not present in the hot node 1502) is accessed. In theexample of FIG. 15A, the pointer 1508 points to logical block L1.

The second node (cold node) 1504, as depicted in FIG. 15A may includelogical blocks at time t0 as illustrated. The second node 1504 may be asecond chunk or portion of the memory 212. For instance, the second node1504 can be associated with a second group of logical blocks and can bestored in the memory 212. The second node 1504 includes less frequentlyaccessed logical blocks L2, L6, L10 and L14. In some embodiments, aftera threshold amount of memory consumption, the less frequently accessedlogical blocks from the cold node 1504 may be paged out to storage media110. The first node 1502 and the second node 1504, as depicted in FIG.15A represents the state of the frequently accessed logical blocks andthe rarely accessed logical blocks at time t0.

The hot node 1512 and the cold nodes 1514, as depicted in FIG. 15Brepresents the state of the frequently accessed logical blocks and theless frequently accessed logical blocks at time t1. At time t1,translation table entry for logical block L3 was accessed. A translationtable entry for logical block L3 was be created after time t0 but beforetime t1. As the logical block L3 was not present in the first node 1502and the second node 1504, the translation entry for L3 was fetched fromstorage device 110 and added to the first node 1502 (hot node) at theslot pointed to by the pointer 1508. The logical block L3 replaced thelogical block L1, as illustrated in the FIG. 15B and the logical blockL1 was moved to the second node 1504. In some embodiments, an access bitassociated with the logical block L3 is updated to an ON status. Thenext entry to replace pointer 1508 identifies logical blocks to replacefrom the hot node 1512 by traversing the hot node 1512 in a full cycle.In some embodiments, L3 remains in the hot node 1512 for at least onefull cycle of the next entry to replace pointer 1508 to walk through thehot node 1512. In some embodiments, if L3 is accessed again, the accessbit associated with L3 is turned ON for another cycle of the next entryto replace pointer 1508. The hot node 1502 from time t0 is updated tothe hot node 1512 at time t1.

The hot node 1512 including logical blocks L3, L5, L9 and L13 at time t1is shown in FIG. 15B. For instance, the hot node 1512 includesfrequently accessed logical blocks L3, L5, L9 and L13. The hot node 1512is updated so the next entry to replace pointer 1508 points at the nextentry to replace in the hot node 1512, specifically logical block L5.The hot node 1512 includes frequently accessed logical blocks (mostfrequently accessed logical block being L3). The next entry to replacepointer 1508 points to a logical block within the hot node 1512 that wasthe last to be accessed. For instance, the next entry to replace pointer1508 may point to a logical block which will be relocated from the hotnode 1512 if a new logical block (not present in the hot node 1512) isaccessed. In the example of FIG. 15B, the pointer 1508 points to logicalblock L5.

As depicted in FIG. 15B, a second node (cold node) 1514 at time t1 mayinclude the logical block L1 as illustrated. For instance, the secondnode 1514 also includes less frequently accessed logical blocks L2, L6,L10 and L15. In response to a request to memory reclaim, logical blocksfrom the cold node 1514 may be paged out of the memory 212.

FIG. 16 is a flow chart of an example method 1600 for trackingtranslation table entries in memory 212. The method 1600 may initiate byreceiving 1602 a request to select translation table entries to store ina storage device 110. In some embodiments, the translation table entriesmay be purged out of memory to store in the storage device 110. In someembodiments, the request to a request to select translation tableentries in a dump unit may be associated with, but not limited to, arequest to select a forward translation table entry in a dump unit and arequest to select a reverse translation table entry in the dump unit. Infurther embodiments, the operations in step 1602 may be performed by thetranslation table preserving module 804 in cooperation with the dumpgroup generating module 402 and one or more other entities of the system100, as discussed elsewhere herein.

Next, the method 1600 may continue by determining 1604 a plurality oftranslation table entries associated with a dump unit. In someembodiments, the dump group generating module 402 may identify theplurality of translation table entries associated with the dump unit.

The method 1600 may advance by allocating 1606 the plurality oftranslation table entries into a first group of translation tableentries associated with a first node and a second group of translationtable entries associated with a second node, the first group oftranslation table entries being frequently accessed and the second groupof translation table entries being less frequently accessed. In someembodiments, the translation table preserving module 804 may divide theplurality of translation table entries into the first group oftranslation table entries and the second group of translation tableentries. In some embodiments, the translation table preserving module804 may determine the first node and the second node based on a ratio ofa total number translation table entries in the memory 212 to a totalnumber of translation table entries in the storage device 110.

The method 1600 may then continue by determining 1608 a first statusassociated with a first recent access bit for a first translation tableentry, the first translation table entry being included in the firstgroup of translation table entries. In some embodiments, the translationtable preserving module 804 may assign a recent access bit to eachtranslation table entry in the first group of translation table entries.The recent access bit is turned ON whenever the translation table entryassociated with the recent access bit is accessed. In some embodiments,the recent access bit is turned OFF when the translation table entry isaccessed before a threshold time.

In some embodiments, the translation table preserving module 804 mayreceive a request to access a second translation table entry. Inresponse to receiving the request to access the second translation tableentry, the translation table preserving module 804 may assign an ONstatus to a second recent access bit associated with the secondtranslation table entry and add the second translation table entry tothe first group of translation table entries. In some embodiments, thefirst translation table entry may be stored in the reverse translationmap 304. In further embodiments, the first translation table entry mayalso be stored in the forward translation map 302.

Next, the method 1600 may add 1610 the first translation table entry tothe second group of translation table entries. In one embodiment, thetranslation table preserving module 804 may add the first translationtable entry to the second group of translation table entries in responseto determining that the recent access bit associated with the firsttranslation table entry is turned OFF. In some embodiments, thetranslation table preserving module 804 may relocate the second group oftranslation table entries from the memory 212, in response to a requestof memory reclaim.

In some embodiments, the translation table preserving module 804 mayreceive a request to relocate translation table entries to the storagedevice 110. The translation table preserving module 804 may select thefirst translation table entry from the second group of translation tableentries to relocate to the storage device 110.

FIGS. 17A and 17B are flow charts of an example method for maintaining amulti-level linked list for translation table entries. The method 1700may begin by receiving 1702 a request to select dump groups to store ina storage device 110. In some embodiments, the operations in step 1702may be performed by the translation table tracking module 802 incooperation with the unified paging module 202 and one or more otherentities of the storage logic 104. For instance, the translation tabletracking module 802 receives the request to select a dump groupassociated with a dump unit stored in the memory 212. In someembodiments, the unified paging module 202 may identify the dump unit.

Next, the method 1700 advances by identifying 1704 a dump groupassociated with a dump unit. In one embodiment, the unified pagingmodule 202 identifies the dump group associated with the dump unit.

Next, the method 1700 advances by determining 1706 a first plurality ofdump units associated with the dump group. In one embodiment, thetranslation table tracking module 802 determines the first plurality ofdump units associated with the dump group in cooperation with theunified paging module 202.

Next, the method 1700 can continue by determining 1708 a secondplurality of dump units from the first plurality of dump units, whereinthe second plurality of dump units are non-persisted in the storagedevice 110. In some embodiments, the translation table tracking module802 may determine the second plurality of dump units from the firstplurality of dump units, wherein the second plurality of dump units arenot backed up in the storage device 110.

Next, the method 1700 may determine 1710 third plurality of dump unitsfrom the first plurality of dump units, wherein the third plurality ofdump units are not allowed to be purged from the memory. In someembodiments, the operations in step 1710 may also be performed by thetranslation table tracking module 802 in cooperation with the pinningmodule 702 and one or more other entities of the storage logic 104. Forinstance, the translation table tracking module 802 determines that thethird plurality of dump units are pinned in the memory 212.

Referring now to FIG. 17B, the method 1700 advances by calculating 1712a ratio between the first plurality of dump units and the secondplurality of dump units. In one embodiment, the translation tabletracking module 802 may calculate a ratio between the first plurality ofdump units and the second plurality of dump units. For instance, thetranslation table tracking module 802 may calculate a ratio between thetotal number of dump units associated with a dump group and a number ofdump units associated with the dump group not stored in the storagedevice 110.

Responsive to calculating the ratio between the first plurality of dumpunits and the second plurality of dump units, the method 1700 cancontinue by determining 1714 that the ratio satisfies a threshold. Insome embodiments, the translation table tracking module 802 maydetermine a threshold based on a total number of dump units associatedwith the dump group. For instance, if the ratio is above the threshold,it indicates that the number of dirty entries in the dump group ishigher. In some embodiments, the translation table tracking module 802may determine the threshold as a range. For instance, if the ratio fallsin the range, the translation table tracking module 802 determines thatthe ratio satisfies the threshold.

Lastly, the method 1700 may continue by adding 1716 the dump group to amulti-level linked list based on the ratio. In some embodiments, themulti-level linked list includes a first level linked list and a secondlevel linked list based on the threshold. For instance, the translationtable tracking module 802 may determine that the ratio is above thethreshold and the translation table tracking module 802 may add the dumpgroup to the first level linked list. In another embodiment, thetranslation table tracking module 802 may determine that the ratio isbelow the threshold and the translation table tracking module 802 mayadd the dump group associated with the ratio to the second level linkedlist. In one embodiment, the translation table preserving module 804 mayreceive a request for memory reclaim and the translation tablepreserving module 804 may select a translation table entry from thefirst level linked list (ratio above the threshold) for relocation. Theoperations in step 1716 can be performed by the translation tabletracking module 802 in cooperation with one or more other entities ofthe storage logic 104.

Systems and methods for implementing an efficient data managementarchitecture are described below. In the above description, for purposesof explanation, numerous specific details were set forth. It will beapparent, however, that the disclosed technologies can be practicedwithout any given subset of these specific details. In other instances,structures and devices are shown in block diagram form. For example, thedisclosed technologies are described in some implementations above withreference to user interfaces and particular hardware. Moreover, thetechnologies disclosed above primarily in the context of on lineservices; however, the disclosed technologies apply to other datasources and other data types (e.g., collections of other resources forexample images, audio, web pages).

Reference in the specification to “one embodiment” or “an embodiment”means that a particular feature, structure, or characteristic describedin connection with the implementation is included in at least oneimplementation of the disclosed technologies. The appearances of thephrase “in one embodiment” in various places in the specification arenot necessarily all referring to the same implementation.

Some portions of the detailed descriptions above were presented in termsof processes and symbolic representations of operations on data bitswithin a computer memory. A process can generally be considered aself-consistent sequence of steps leading to a result. The steps mayinvolve physical manipulations of physical quantities. These quantitiestake the form of electrical or magnetic signals capable of being stored,transferred, combined, compared, and otherwise manipulated. Thesesignals may be referred to as being in the form of bits, values,elements, symbols, characters, terms, numbers, or the like.

These and similar terms can be associated with the appropriate physicalquantities and can be considered labels applied to these quantities.Unless specifically stated otherwise as apparent from the priordiscussion, it is appreciated that throughout the description,discussions utilizing terms for example “processing” or “computing” or“calculating” or “determining” or “displaying” or the like, may refer tothe action and processes of a computer system, or similar electroniccomputing device, that manipulates and transforms data represented asphysical (electronic) quantities within the computer system's registersand memories into other data similarly represented as physicalquantities within the computer system memories or registers or othersuch information storage, transmission or display devices.

The disclosed technologies may also relate to an apparatus forperforming the operations herein. This apparatus may be speciallyconstructed for the required purposes, or it may include ageneral-purpose computer selectively activated or reconfigured by acomputer program stored in the computer.

The disclosed technologies can take the form of an entirely hardwareimplementation, an entirely software implementation or an implementationcontaining both hardware and software elements. In some implementations,the technology is implemented in software, which includes but is notlimited to firmware, resident software, microcode, etc.

Furthermore, the disclosed technologies can take the form of a computerprogram product accessible from a non-transitory computer-usable orcomputer-readable medium providing program code for use by or inconnection with a computer or any instruction execution system. For thepurposes of this description, a computer-usable or computer-readablemedium can be any apparatus that can contain, store, communicate,propagate, or transport the program for use by or in connection with theinstruction execution system, apparatus, or device.

A computing system or data processing system suitable for storing and/orexecuting program code will include at least one processor (e.g., ahardware processor) coupled directly or indirectly to memory elementsthrough a system bus. The memory elements can include local memoryemployed during actual execution of the program code, bulk storage, andcache memories which provide temporary storage of at least some programcode in order to reduce the number of times code must be retrieved frombulk storage during execution.

Input/output or I/O devices (including but not limited to keyboards,displays, pointing devices, etc.) can be coupled to the system eitherdirectly or through intervening I/O controllers.

Network adapters may also be coupled to the system to enable the dataprocessing system to become coupled to other data processing systems orremote printers or storage devices through intervening private or publicnetworks. Modems, cable modems and Ethernet cards are just a few of thecurrently available types of network adapters.

Finally, the processes and displays presented herein may not beinherently related to any particular computer or other apparatus.Various general-purpose systems may be used with programs in accordancewith the teachings herein, or it may prove convenient to construct amore specialized apparatus to perform the required method steps. Therequired structure for a variety of these systems will appear from thedescription below. In addition, the disclosed technologies were notdescribed with reference to any particular programming language. It willbe appreciated that a variety of programming languages may be used toimplement the teachings of the technologies as described herein.

The foregoing description of the implementations of the presenttechniques and technologies has been presented for the purposes ofillustration and description. It is not intended to be exhaustive or tolimit the present techniques and technologies to the precise formdisclosed. Many modifications and variations are possible in light ofthe above teaching. It is intended that the scope of the presenttechniques and technologies be limited not by this detailed description.The present techniques and technologies may be implemented in otherspecific forms without departing from the spirit or essentialcharacteristics thereof. Likewise, the particular naming and division ofthe modules, routines, features, attributes, methodologies and otheraspects are not mandatory or significant, and the mechanisms thatimplement the present techniques and technologies or its features mayhave different names, divisions and/or formats. Furthermore, themodules, routines, features, attributes, methodologies and other aspectsof the present technology can be implemented as software, hardware,firmware or any combination of the three. Also, wherever a component, anexample of which is a module, is implemented as software, the componentcan be implemented as a standalone program, as part of a larger program,as a plurality of separate programs, as a statically or dynamicallylinked library, as a kernel loadable module, as a device driver, and/orin every and any other way known now or in the future in computerprogramming. Additionally, the present techniques and technologies arein no way limited to implementation in any specific programminglanguage, or for any specific operating system or environment.Accordingly, the disclosure of the present techniques and technologiesis intended to be illustrative, but not limiting.

What is claimed is:
 1. A method comprising: identifying a plurality ofdump units associated with a translation table in a storage device;determining a plurality of snapshot markers associated with theplurality of dump units; calculating a first value of a first snapshotmarker from the plurality of snapshot markers in the storage device;identifying a second snapshot marker from an additional source, thesecond snapshot marker having a second value after the first value;retrieving a dump unit associated with the second snapshot marker fromthe additional source; and reconstructing the translation table usingthe dump unit.
 2. The method of claim 1, wherein the first snapshotmarker includes a free running incrementing counter value denoting atimestamp of sufficient granularity.
 3. The method of claim 1, whereinthe first snapshot marker includes a counter value associated with anupdate of a translation table, the counter being incremented each timethe translation table is persisted.
 4. The method of claim 1, whereinthe additional source is a meta-log and the first snapshot markerincludes a counter value associated with a meta-log entry, the counterbeing incremented each time a new meta-log entry is created.
 5. Themethod of claim 1, wherein the additional source includes a reversetranslation table and a meta-log.
 6. The method of claim 1, furthercomprising: receiving a request to reconstruct the translation tablestatistics; identifying a third snapshot marker from the additionalsource, the third snapshot marker being associated with a subset of dumpgroups and the third snapshot marker having a third value after thefirst value; reading the subset of dump groups associated with thetranslation table from the additional source; and reconstructing thetranslation table statistics using the subset of dump groups associatedwith the translation table.
 7. The method of claim 1, wherein thereconstruction of the translation table using the dump unit, furthercomprises adding the dump unit to the translation table in the memory.8. A method comprising: receiving a request to create a translationtable entry; logging the translation table entry in a meta-log;incrementing a first value of a first snapshot marker associated withthe meta-log; updating a reverse translation table with the translationtable entry; determining whether the updated reverse translation tableis persisted in a storage device; and in response to determining thatthe updated reverse translation table is persisted in the storagedevice, incrementing a second snapshot marker associated with thereverse translation table.
 9. The method of claim 8, further comprising:storing the first snapshot marker and the second snapshot marker inmemory.
 10. The method of claim 8, wherein the first snapshot markerincludes a free running counter value denoting a timestamp of sufficientgranularity.
 11. The method of claim 8, wherein the first snapshotmarker includes a counter associated with an update of a translationtable, the counter being incremented each time the translation table ispersisted.
 12. The method of claim 8, wherein the additional source is ameta-log and the first snapshot marker includes a counter valueassociated with a meta-log entry, the counter being incremented eachtime a new meta-log entry is created.
 13. The method of claim 8, furthercomprising: receiving a request to reconstruct the translation tablestatistics; identifying a third snapshot marker from an additionalsource, the third snapshot marker being associated with a subset of dumpgroups and the third snapshot marker having a third value after a firstvalue; reading the subset of dump groups associated with the translationtable from the additional source; and reconstructing the translationtable statistics using the subset of dump groups associated with thetranslation table.
 14. A system comprising: a processor; and a memorystoring instructions that, when executed, cause the system to: identifya plurality of dump units associated with a translation table in astorage device; determine a plurality of snapshot markers associatedwith the plurality of dump units; calculate a first value of a firstsnapshot marker from the plurality of snapshot markers in the storagedevice; identify a second snapshot marker from an additional source, thesecond snapshot marker having a second value satisfying the first value;retrieve a dump unit associated with the second snapshot marker from theadditional source; and reconstruct the translation table using the dumpunit.
 15. The system of claim 14, wherein the first snapshot markerincludes a free running counter denoting a timestamp of sufficientgranularity.
 16. The system of claim 14, wherein the first snapshotmarker includes a counter associated with an update of a reversetranslation table, the counter being incremented each time the reversetranslation table is persisted.
 17. The system of claim 14, wherein theadditional source is a meta-log and the first snapshot marker includes acounter associated with a meta-log entry, the counter being incrementedeach time a new meta-log entry is created.
 18. The system of claim 14,wherein the additional source includes a reverse translation table and ameta-log.
 19. The system of claim 14, further comprising: receiving arequest to reconstruct the translation table statistics; identifying athird snapshot marker from the additional source, the third snapshotmarker being associated with a subset of dump groups and the thirdsnapshot marker having a third value satisfying the first value; readingthe subset of dump groups associated with the translation table from theadditional source; and reconstructing the translation table statisticsusing the subset of dump groups associated with the translation table.20. The system of claim 14, wherein the reconstruction of thetranslation table using the dump unit, further comprises adding the dumpunit to the translation table in the memory.